C++ Programming Code Examples
C++ > Computer Graphics Code Examples
Telescopic Squares
Program Convert Hexadecimal to Decimal -
To convert a number from "hexadecimal" into equivalent decimal format "in C++", enter the hexadecimal number to convert it to decimal to display the equivalent value in "decimal" as
Use If Else Statements C++ Programming -
In sometimes you have a "condition" and you want to execute a block of code if condition is true and execute another piece of code if the same condition is false. This can be achieved
C Program code check Armstrong Number -
A number is called as "Armstrong Number" if Sum of Cubes of Digits of Number is equal to the number itself. In C code, we are checking the input number is Armstrong or not. Check
C Armstrong numbers between an interval -
Declare function to print Armstrong numbers in given range. Lets give a meaningful name to function. Say "printArmstrong()" function prints all Armstrong numbers in given range.
C++ Compute Power with pow() Function -
In this 'C++' sample, you will learn to compute power to a number manually, by using 'pow()' function. Takes two numbers from the user (a base number and an "exponent") & calculates
Compare two Strings in the C++ language -
Function will return 0, if the strings are equal; return 'negative value', if "string1 is less" than string2 and return "positive value" if string1 is greater than string2. This function 'compares'
Function to Return a String representation -
C Convert an integer to a string. Caller must allocate string array. Function returns string to allow. Use of the function in an expression. Generate digit characters in reverse order...
C++ Codes Linear Congruential Generator -
C++ Program to "generate random numbers" using Linear Congruential Generator. A linear congruential generator (LCG) is an algorithm that yields a sequence of pseudo-randomized