57.0k views
4 votes
Write the c++ program of the following out put
*
**
***
****
*****​

User Ian Samz
by
7.4k points

1 Answer

1 vote
#include
using namespace std;

int main() {
for (int i = 1; i <= 5; i++) {
for (int j = 1; j <= i; j++) {
cout << "*";
}
cout << endl;
}
return 0;
}
User Pecos Bill
by
7.2k points