Computer Science, asked by anaborah77, 6 months ago

Find the output. also show the working

int x=7,y=5;
for (int i=1; i<=3; i++)
{
if ( i+x )% 2==0)
{
y++;
}
else
{
y--;
}
system.out.println (i+x+y);
}​

Answers

Answered by koushikvns
1

Answer:

14 14 16

Explanation:

After you run this program ,the output will be :-

14

14

16

If you have to understand the working of the program,dry run the program to better understand the working concept...It will be vey lengthy to explain it here ,so I'm giving you the direct output...Sorry ....

Answered by niranjanasathish
0

14

14

16

is the output

..

Similar questions