Nested Loop
* * * * *
* * * *
* * *
* *
*
Answers
Answered by
1
Answer:
#include <stdio.h>
int main()
{
int i, j, rows;
/* Input number of rows from user */
printf("Enter number of rows : ");
scanf("%d", &rows);
/* Iterate through rows */
for(i=1; i<=rows; i++)
{
/* Iterate through columns */
for(j=i; j<=rows; j++)
{
printf("*");
}
/* Move to the next line */
printf("\n");
}
return 0;
}
Similar questions
English,
2 months ago
Social Sciences,
2 months ago
French,
2 months ago
Political Science,
5 months ago
Math,
11 months ago
Physics,
11 months ago