60 658
Assignments Done
97,7%
Successfully Done
In April 2018

Answer to Question #17068 in C++ for julius bueta

Question #17068
wright a program that will display the following pattern,given the value of n.
Example: if n=4,output
*
* *
* * *
* * * *
Expert's answer

#include<iostream>

#include<conio.h>

using namespace std;

int main()

{

int N;

cout << "Enter any number" << endl;

cin >> N;




do

{

for (int i = 0; i < N; i++) {

cout << "* ";

}

cout << endl;

N--;

} while(N != 0) ;




getch();

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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions