Answer to Question #284716 in C++ for papi

Question #284716

Write a program to display the output below: You may input number of rows and columns.


*

* * *

* * * * *

* * * * * * *

* * * * * * * * *

* * * * * * * * * * *


1
Expert's answer
2022-01-11T11:11:54-0500
using namespace std;




int main()
{
	int n=0,i;
	while(n<6)
	{
		for(i=0;i<(2*n+1);i++) cout<<"* ";
		cout<<endl;
		n++;
	}
	return(0);
}

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