I_RECTAN - for(a=4;a>=1;a for(b=1;b<=5;b if(a b<=5...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//diamond// / #include<stdio.h> #include<conio.h> # void main(void) { int a,b; clrscr(); for(a=1;a<=5;a++) { for (b=1;b<=5;b++) { if(a+b<=5) printf(" "); else printf("%d ",a+b-5); } for (b=4;b>=1;b--) { if(a+b<=5) printf(" "); else printf("%d ",a+b-5); } printf("\n");
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } for(a=4;a>=1;a--) { for (b=1;b<=5;b++) { if(a+b<=5) printf(" "); else printf("%d ",a+b-5); } for(b=4;b>=1;b--) { if(a+b<=5) printf(" "); else printf("%d ",a+b-5) ; } printf("\n"); } getch(); }...
View Full Document

This note was uploaded on 11/06/2010 for the course UBIT 411 taught by Professor Saleemelahi during the Spring '10 term at University of Karachi.

Ask a homework question - tutors are online