# C++ Programming Code Examples

## C++ > Pyramid Patterns Code Examples

### ask to the user to enter number of rows for diamond dimension to print the diamond pattern,

Sum the Integers from 1 to users number -
Sum the integers from 1 to a user-specified number in C programming language. Declare the number of integers to be summed. The loop counter. Sum integers from 1 to count.

C Programming Uses For Loop Statements -
For Loop in C. First initialization happens and the counter variable gets initialized. Second step the condition is checked, where counter variable is tested for the given condition, if...

C Check if the Matrix is an Identity Matrix -
C code checks a given Matrix is an Identity Matrix. Identity matrix is a square matrix with 1's along the diagonal from upper left to lower right and 0's in all other positions. If it

Converts Hexadecimal to Binary Numbers -
Hexadecimal to Binary conversion is divided in 3 steps. Extract each hex digits separately. Find the Binary of each extracted Hex digit. Store the binary equivalent of extracted hex

C++ Program Three Dimensional 3D Array -
3D array contains three for loops. to initialize and "print three dimensional" array, you have to use three for loops. Third for loop forms 1D array, Second for loop forms 2D array and the

C++ Program Find Quotient & Remainder -
In program, user enter 2 integers (divisor and dividend), computes quotient and remainder. To compute 'quotient and remainder', divisor and dividend should be integers. The division

Function Classes in The C++ Programming -
We have two classes XYZ and ABC. The XYZ class has two "private data members" ch and num, this class declares 'ABC' as Friend Class. This means that 'ABC' can access the private

Code Swap first and last digit of a number -
C program to input a number from user and swap first and last digit of the given number. Input number from user, find last digit, find total number of digit - 1, find first digit. How