Program 154:
//Coming Soon...
Output:
#include<stdio.h> main() { int i,j,rows,temp; printf("Enter number of rows:\n"); scanf("%d",&rows); temp=rows; printf("\n"); for(i=1;i<=rows;i++) { for(j=1;j<=i;j++) { printf("%d ",temp); } temp--; printf("\n"); } temp+=2; for(i=rows-1;i>=1;i--) { for(j=i;j>=1;j--) { printf("%d ",temp); } temp++; printf("\n"); } }
Explanation:
//Coming Soon...
Output: