write a program to print the given pattern
*****
****
***
**
*
Answers
Answered by
1
- int main() { int row, c, n;
- printf("Enter the number of rows in pyramid of stars to print\n"); scanf("%d", &n);
- for (row = 1; row <= n; row++) // Loop to print rows. { ...
- for (c = 1; c <= 2*row - 1; c++) // Loop to print stars in a row. printf("*");
- printf("\n"); }
Answered by
1
Answer:
hope it's helpful and Mark me as brainlist and follow me
Explanation:
Pattern program in C
int main() { int row, c, n;
printf("Enter the number of rows in pyramid of stars to print\n"); scanf("%d", &n);
for (row = 1; row <= n; row++) // Loop to print rows. { ...
for (c = 1; c <= 2*row - 1; c++) // Loop to print stars in a row. printf("*");
printf("\n"); }
Similar questions
India Languages,
4 months ago
Math,
4 months ago
Math,
4 months ago
Chemistry,
8 months ago
Biology,
8 months ago
Chemistry,
1 year ago
Political Science,
1 year ago