 # C++ Programming Code Examples

## C++ > Pyramid Patterns Code Examples

### Program to print pyramid using numbers

C Code Check Palindrome Using Recursion - In this article we have shared two C programs to check if the input number is palindrome or not. 1) using while loop 2) using recursion. If a number 'remains same', even if we reverse its

Simple C++ Coding for Single Inheritance - Start the C++ program. Declare the base class emp. Define and declare the function get() to get the employee details. Declare the derived class salary. "Declare and define" the function

Performs Edge Coloring to the Line Graph - Takes the input of the number of 'vertexes' & the number of edges in the graph. It takes the input of vertex pairs for the given number of edges. It generates a line graph for the given

Construct an Expression Tree For a Given - Program, using recursion, evaluates a Prefix Expression in an "Expression Tree". A binary expression tree is a specific application of a 'binary tree' to evaluate certain expressions.

Prints Days in Month Logical OR Operator - The above logic is simple & easy to code. But it's lengthy and not optimal to implement. In the above solution we are performing same task for multiple conditions i.e. print 31 days

Finds Factorial of Number using Recursion - This c program prompts user for entering any integer, finds the Factorial of input number & displays the output on screen. Use a recursive user defined function to perform the task. We

Program Sortings an Array of 10 Elements - "Heapsort" can be thought of as an improved "selection sort": like that algorithm, it divides its input into a sorted and an unsorted region, and it iteratively shrinks the unsorted region

C++ Simple Program Multiple Inheritance - Declare the base class student. Declare and define the function "get()" to get the student details. Declare the other class sports. Then Declare and define the function "getsm()" to