## Simple program to print right triangle shape in C++

A very simple program to print right triangle shape in C++. PROGRAM: #include<iostream> using namespace std; int main() { for(int i=0;i<=5;i++){ for(int j=0;j<=i;j++) { cout<<j; } cout<<endl; } return 0; }   OUTPUT: 0 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0 1 2 3 4 5

## Program to implement Linear Search C++

Here we will write a program to implement Linear Search C++ programming language, so first lets start with what is linear search and then we will write a program in C++ to implement Linear Search.   What is Linear Search: Linear search or sequential search is a method for finding a target value within a … Read more

## Program to find reverse number in C++

In this post we will understand the logic to find the reverse number of a given number, then we will implement the  same in C++ programming language. Let’s understand the logic: Logic: This program takes an integer input from the user. Then the while loop is used until n != 0 is false (0). In each iteration of the … Read more

## C++ Program to find factorial of a Number

What is Factorial of a number? Factorial of a number ‘n’ is the product of all positive integers less than or equal to n, denoted by ‘n!’. For example find factorial of 5. 5! = 5 x 4 x 3 x 2 x 1 = 120 Now let’s see the program to find factorial of a … Read more

## Program to Solve Quadratic equation C++

Here we will a write a program to solve quadratic equation C++ programming language. Let’s first understand how to solve a quadratic equation: Let’s take the quadratic equation as: ax²+bx+c=0 How program works: Take the values for a, b and c (double type). if, a = b = 0 then invalid equation if b² -4ac < … Read more