How to create opposite right angle triangle using integers
------------------------------------------------------program------------------------------------------------------
------------------------------------------------------output--------------------------------------------------------
#include<stdio.h> #include<conio.h> main() { int r,c,n; printf("Enter the numbers of row: "); scanf("%d",&n); for(r=0;r<=n-1;r++) { for(c=n-r;c>=1;c--) { printf("%d",c); } printf("\n"); } getch(); }
------------------------------------------------------output--------------------------------------------------------
Screenshot for above pyramid program |
No comments