Patterns in C++ Language by MistarAV
List of Source Code Print triangle using *, digits and characters Print inverted triangle using * and digit Code to Print pyramid Code to Print reverse pyramid Code to Print Pascal's traingle Code to Print Floyd's triangle Programs to print triangles using *, numbers and characters Patterns code in C Programming language Click here . Example 1: Program to print half pyramid using * * * * * * * * * * * * * * * * Source Code #include <iostream> using namespace std; int main() { int rows; cout << "Enter number of rows: "; cin >> rows; for(int i = 1; i <= rows; ++i) { for(int j = 1; j <= i; ++j) { cout << "* "; } cout << "\n"; } return 0; } Example 2: Program to print half pyramid a using numbers 1 1 2 1 2 3 1 2 3 4 1 2 3