1.

1. Write a program to print a pattern asfollows:* * * * * * ** *​

Answer»

Pattern program in Cint 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"); }



Discussion

No Comment Found