furqankaimkhani
Member level 4
- Joined
- Sep 10, 2010
- Messages
- 79
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 1,288
- Activity points
- 1,946
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 #include<stdio.h> #include<conio.h> void main(void) //|_Muhammad Furqan__| { int j = 0; //|____10-2-2013_____| clrscr(); for(int i=1;i<=7;i++) { for(int n=65 ; n<72 ; n++) // Explanation: printf("%c ",n); // 'j' is for putting gap(the gap pyramid), n=n-2; // 'i' is for printing 7 rows and for(j;j<i;j++) // 'n' is for printing the Alphabets. { if (j=0) // Problem: This "[B]if[/B]" is the stuck point. printf("G "); // When run, this program gets hanged printf("\b\b "); // after printing one row. } // apparently, without any Syntax Error. for( n ; n>64 ; n--) printf("%c ",n); printf("\n"); } getch(); return; }
Last edited by a moderator: