# C++ Programming Code Examples

## C++ > Mathematics Code Examples

### Program to Compute Discrete Fourier Transform Using Naive Approach

C Code Find area of an equilateral triangle -
C program code input side of an equilateral triangle from user and find area of the given triangle. How to find area of an equilateral triangle in C. Area of an equilateral triangle

Code to find Sum of Digits using recursion -
Write a Recursive Function in C Language to calculate sum of digits of a number. Declare Recursive Function to find sum of digits of a number. First give a meaningful name to the

C Language Program Infinite While Loops -
C Code example of Infinite While Loop. Since the value of the variable var is same (there is no ++ or -- operator used on variable, inside the body of loop) the condition var<=2 will be

Convert Decimal to Octal in C++ language -
To convert decimal number to octal number in C++ programming, you have to ask to the user to enter the decimal number to convert it into octal number to display the equivalent

If Any Graph is Possible to be Constructed -
This algorithm takes the input of the number of 'Vertexes' and their corresponding degree. Checks various 'constraints', tries to build the graph. If it fails, no valid graph can be created

Reversing Position of all Digits of Number -
For example reverse of 849 is 948. This code is write using for loop, 'Modulus Operator', if condition statement. User enter any number. 'Receive integer' value from user. Then check

C++ Language Add Digits of any Number -
To add digits of any number in C++, we enter the number to add their digits & displays the "Addition Result" of the digits of the entered number on the output screen as shown here

Program to Find the Vertex Connectivity -
C++ Program finds vertex connectivity of a graph. A vertex in an undirected connected graph is an articulation point iff removing it disconnects the graph. 'Articulation points'