Tuesday, September 8, 2009

DRAW THE FOLLOWING PYRAMID IN C

1
0 1
1 0 1
0 1 0 1




void main(){ int i,j; clrscr(); for(i=1;i<10;i++) { for(j=i;j>=1;j--) { printf("%d",j%2); } printf("\n"); } getch();}

No comments:

Post a Comment