Monday, October 12, 2009

Iterative Statement - Problem on C Programming

What is the screen output of the ff. program?

#include
main()
{
int x,y;
for (x=2;x<=4;x++)
for(y=5;y>=3;y--)
printf("%d\n",x+y);
getch();
}

Output:

7
6
5
8
7
6
9
8
7
_

Labels: