Program to print
*
**
***
****
C++..class 11
RagaviRagavendra:
hi
Answers
Answered by
17
/* C++ program to print the given pattern */
include <iostream>
using namespace std;
int main()
{
int n;
cout << "Enter number of rows: ";
cin >> n;
for(int r = 1; r <= n; r++)
{
for(int c = 1; c <= r; c++)
{
cout << "*";
}
cout << "\n";
}
return 0;
}
In each row, asterisks are to be printed and the number of asterisks in each row is equal to corresponding row number.
Attachments:
Answered by
0
Hey.........,,.., do u remember me.....
Similar questions