What comes out?
1. for (int x = 12; x > 3; x-=2)
System.out.print( x);
2. for (int x = 3; x < 11 ; x = x + 2)
System.out.print( x);
3. for (int x = 20; x >5 ; x -= 3)
System.out.print( x);
4. for (int y= 9; y != 16 ; y = y + 2)
System.out.print( y);
5. for (int x= 7 ; x > 5 ; x--)
System.out.print( "Tom");
6. for (int x = 8; x >= 0 ; x = x - 2)
System.out.print( "Pete");
7. for (int x = 7; x > 11 ; x ++)
System.out.print( x);
8. int sum =0;
for (int a = 1; a <= 3; a++)
{sum = sum + a;
System.out.print( sum);
}
9. int sum =0;
for (int a = 1; a <= 3; a++)
{sum = sum + a;
}
System.out.print( sum );
10. int sum =0;
for (int a = 1; a <= 3; a++)
{System.out.print(sum);
sum = sum + a;
}
11. for (int a = 1; a <= 3; a++)
{ sum =0;
sum = sum + a;
System.out.print( sum );
}
12. for (int x=11; x > 3; x--)
{System.out.print( "Tom");
System.out.print( "Pete");
System.out.println() ;
}
13. sum = 0;
for (int x=1; x <= 7; x += 2)
sum += x;
System.out.print( sum);
14. sum = 0;
for (int x=1; x <= 7; x += 2)
{ sum += x;
System.out.print( sum);
}
15. sum = 20;
for (int x=2;x<= 8;x = x + 2)
sum -= x;
System.out.print( sum);
16. for (int x=1; x <= 25; x ++)
if (x % 5==0 || x % 7 == 0)
System.out.println( x );
17. sum = 0;
for (int x= 1 ; x <= 25 ; x++)
if (x % 9==0)
sum = sum + x;
System.out.print( sum);
18. sum = 0;
for (int x= 1 ; x <= 25 ; x++)
if (x % 9==0)
{ sum = sum + x;
System.out.print( sum);
}
19. for (int x=1; x <= 50; x++)
if (x % 7==0 && x < 20)
System.out.print( x );
20. for (int x=1; x <= 30 ; x++)
if (x % 2==0 && x % 7 ==0)
System.out.print( x) ;