hello [:pleased:] i have made a program but it didn't give required output [:shout:] so plz help me to get required output........ i want to get output as 1 1 1 2 2 1 1 2 3 3 2 1 1 2 3 4 4 3 2 1 1 2 3 4 5 4 3 2 1 tell me... what will be the c program to solve this problem with regards...
Code: int j; for(int i = 1 ; i <= 5; i++) { for( j = 1 ; j <= i ;j++) { printf("%d ",j); } for( j = i ; j >= 1 ;j--) { if(j == 5 ) continue; printf("%d ",j); } printf("\n\n"); }