C program for left hand side right angle triangle
-------------------------------------------------------Program--------------------------------------------------
-------------------------------------------------------Output----------------------------------------------------
#include<stdio.h> #include<conio.h> main() { int r,c,n,at; printf("Enter the numbers of row: "); scanf("%d",&n); for(r=1;r<=n;r++) { for(c=(n-r);c>=1;c--) { printf(" "); } for(at=1;at<=r;at++) printf("%d",at); printf("\n"); } getch(); }
-------------------------------------------------------Output----------------------------------------------------
Screenshot for above progarm |
No comments