C > Beginners Lab Assignments
Printint a double pyramid
Printint a double pyramid #include
#include
void main(void) { clrscr(); int i,j,k,l,b,n; printf("Enter the value of N:"); scanf("%d",&n); for(i=0;i
i;k--) printf("%d",k); } b=n-1; for(i=0;i
i;l--) printf(" "); for(j=b;j<=n;j++) printf("%d",j); for(k=n-1;k>=b;k--) printf("%d",k); b--; } getch(); }
C Codes
Beginners
C on Unix
Code Snippets
Data Structures
File Operations
Games Graphics
Gnu-Linux
Hardware
Mathematics
Miscellaneous
Small Programs
Sorting