Answer to Question #301200 in C++ for Chubby

Question #301200

Make a C++ program using do while loops that will print this output:


*

**

***

****

*****


1
Expert's answer
2022-02-23T12:19:11-0500
#include<iostream>

using namespace std;

int main()
{
	int i=1;
	do
	{
		int j=1;
		do
		{
			cout<<"*";
			j++;
		}while(j<=i);
		cout<<endl<<endl;
		i++;
	}while(i<=5);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog