# C++ Programming Code Examples

## C++ > Pyramid Patterns Code Examples

### Print Pascal's triangle

C++ Implements Fermat's Little Theorem -
Program demonstrates the implementation of Fermat's Little Theorem. For the modular "multiplicative inverse" to exist, the number and 'Modular' must be 'Coprime'. Calculates

C++ Programs to Implements D-ary-Heap -
Filling up 'heap' with the array. A Function to check if heap is empty. Function to get index parent of i. Function to get index of k th child of i. Function to find least element. Function

Prime Numbers in a Range with Functions -
Declare function to find all prime numbers in given range. First give a meaningful name to our function. Say printPrimes() function will print all prime numbers in a range. Declare...

Calculator Program by use C++ Functions -
A simple C++ Calculator which have different functions for different operations. menu base selection screen using switch statement. Ever operation should have its own function. Code

C Increment every Element of the Array by -
C Program increments every element of the array by one & print array. We need to add 1 to all the elemnts of the given array. After adding 1 to all the elements of an array print

Program Finds Sum of Digits of a Number -
Logic to find sum of digits of a given number in C programming. The main idea to find sum of digits can be divided in three steps. Extract last digit of the given number. Add extracted

Binary Search Tree non-recursive traversal -
In this, includes the inserting a node, deleting a node, recursive tree traversal, non-recursive Tree Traversal, finding the minimum and the maximum, leftchild, rightchild, copy a tree to

C++ Wheel Sieve Generate Prime Number -
This is a C++ Program to find 'Prime number' between the given range using 'Wheel Seive' method. "Wheel Factorization" is a graphical method for manually performing preliminary