Computer Science, asked by speaking2asifraza, 4 months ago

write a program to display the pattern ​

Answers

Answered by mrAdorableboy
2

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"); }

Answered by vk150193
0

Answer:

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