Horje
Programs for printing pyramid patterns in C++ Code Example
print pattern and space in cpp
//WAP to print triangle pattern... LOGIC
int num{}, i{1};
  cin >> num;
  while (i <= num) {
    for (int space = 1; space <= (num - i); space++) {  // space
      cout << " ";
    }
    for (int value = 1; value <= (2 * i - 1); value++) {  // value
      cout << value;
    }
    cout << endl; //next row
    i++;
  }
Programs for printing pyramid patterns in C++
#include<iostream>
using namespace std;

int main()
{
	int n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j <= i; j++)
		{
			cout << "*";
		}
		cout << "\n";
	}
	return 0;
}




Cpp

Related
input time from console C++ Code Example input time from console C++ Code Example
c++ simple car game Code Example c++ simple car game Code Example
create vectors of vectors c++ Code Example create vectors of vectors c++ Code Example
Temporary file using MSFT API in cpp Code Example Temporary file using MSFT API in cpp Code Example
map float Code Example map float Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11