63 140
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #16827 in C++ for marie

Question #16827
write a program that will display the following pattern, given the value of n.
example: if n=4, output
****
***
**
*
Expert's answer
#include<stdio.h>
#include<conio.h>
int main()
{
int num,c;
printf("Enter loop repeat number(rows): ");
scanf("%d",&num);
for(; num>=1; num--)
{
for(c=1; c<=num; c++)
printf("*");
printf("
");
}
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