Mirrored Right Triangle Star Pattern
Here you will learn to print a Mirrored Right Triangle Star Pattern in C programming language.
Program Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #include <stdio.h> int main() { int num,i,j; printf("Enter the number of rows: "); scanf("%d",&num); int m = 1; for(int i = num; i >= 1; i--) { for(int j = 1; j <= i - 1; j++) { printf(" "); } for(int k = 1; k <= m; k++) { printf("*"); } printf("\n"); m++; } return 0; } |
Output