C Program Code:
#include<stdio.h> #include<conio.h> int main() { int size,space; int i,j; printf("Print Reverse Triangle in C \n"); printf("Enter Size : "); scanf("%d",&size); for(i=size; i>=1; i--) { for(space=1; space<=size-i; space++) { printf(" "); } for(j=1; j<=i; j++) { printf("*"); } printf("\n"); } getch(); return 0; } |
Print Reverse Triangle in C Output Screenshot
C Program