# C++ Programming Code Examples

## C++ > Mathematics Code Examples

### Find Palindrome number in c++

C++ Program Displays Factors of Number -
Find all 'factors' of an integer using for loop & if statement. Takes a positive integer from an user & displays all the factors of that number. In this program, an integer entered by user is

C++ Code Find Smallest Element in Arrays -
Enter the array size and array elements, now start finding for the "smallest element" in the array to display the smallest element of the array as shown here in C++ sample program.

C++ Program to Find LCM of two Integers -
Examples on different ways to calculate LCM ("Lowest Common Multiple") of two integers using loops and decision making statements. "LCM of two integers" a and b is the smallest

C++ Generating All Subsets of a Given Set -
Program print all the possible combination of each length from the given array in gray code order. The 'time complexity' of this algorithm is 'O(n*(2^n))'. This algorithm takes the input

C Programs Calculates Standard Deviation -
C Language calculateSD() function calculates the Standard Deviation. The array containing 10 elements is passed to the function and this function calculates the Standard Deviation &

Finds Greater Number of Entered Number -
Program 'takes a number' as input and finds a Greater number of the entered number using same digits. Take a number as input. Reverse the number and store it in the array. Using for

C Program Insertion Sort implementations -
'Insertion Sort Algorithm' picks elements one by one & places it to the right position where it belongs in the "Sorted List of Elements". In C program we have "implemented the same"

Program Convert Decimal to Hexadecimal -
C Language Program code to take a decimal number as input and store it in the variable decimalnumber. Initialize the variable j=0 & copy decimalnumber to variable quotient.