pyramid pattern
How to print pyramid Here is the code for the printing the pyramid pattern in the c programming language. code: //print the pyramid pattern by taking input from the user #include <stdio.h> int main() { int space = 0; int star = 0; int lines = 0; int user = 0; int starplus = 0; printf("Enter the number of lines :"); scanf("%d", &user); printf("\n"); starplus = user; while (user != -1){ for (lines = 1; lines <= user; lines++){ for (space = 1; space < lines; space++) printf(" "); for (star = 1; star <= starplus; star++){ printf("* "); } starplus--; printf("\n"); } printf("Enter the number of lines :"); scanf("%d", &user); printf("\n"); starplus = user; } getch(); return 0; } In this example, three for loop is used with different counters.one is used for first spacing and second is used to print the as...