Computer Science, asked by anjana2607, 2 months ago

2. Write a program to print 3 lines of 10 stars in C++

Answers

Answered by Art0709
0

Answer:

#include <iostream>

using namespace std;

int main()

{

int  i, j, n;

cout << "Enter number of rows:  ";

cin >> n;

for(i = 1; i <= n; i++)

{

for(j = 1; j <= i; j++)

{

cout << "* ";

}

//Ending line after each row

cout << "\n";

}

return 0;

}

Similar questions