Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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 << "
";
	}
	return 0;
}
Source by codejudge.blogspot.com #
 
PREVIOUS NEXT
Tagged: #Programs #printing #pyramid #patterns
ADD COMMENT
Topic
Name
9+1 =