Program 369: Left Number Pyramid 4
//Coming Soon
Output:
#include<stdio.h> main() { int i,j,k,rows,count,temp,c; printf("Enter number of rows:\n"); scanf("%d",&rows); for(i=1;i<=rows;i++) { c=1; for(j=1;j<=i;j++) { if(c!=1) printf("0"); else printf("1"); c++; } printf("\n"); } for(i=rows-1;i>=1;i--) { c=1; for(j=i;j>=1;j--) { if(c!=1) printf("0"); else printf("1"); c++; } printf("\n"); } }Explanation:
//Coming Soon
Output: