What comes out? (with braces)
int a=7, b = 6, c = 2;
1. if (a < 5)
{System.out.print("Joe");
System.out.print( "Sue");
}
2. if (a > 4)
System.out.print( "Mike");
System.out.print("Tom");
3. if (a >4)
{ System.out.print( "Mike");
System.out.print( "Fred");
}
else
{ System.out.print( "Mary");
System.out.print( "Sue");
}
4. if (b % 2 ==0)
{System.out.print( "Even");
System.out.println("hello");
}
else
{System.out.print( "Odd");
}
5. if (c % 2 == 1)
System.out.print( "Joe");
System.out.print( "Tom");
6. if (c % 2 == 0)
{System.out.print( "Joe");
System.out.print( "Tom");
}
7. if (a + b < c)
{ System.out.print( "Tom");
}
else
{System.out.print( "Mary");
System.out.print( "Helen");
}
8. if ( c > b)
{System.out.print(a + b * c);
System.out.print( c + b * a);
}
else
System.out.println(b + c * 3);
9. if (a% 2==0 && b % 2 == 0)
{System.out.print( "Sue");
System.out.print( "Fred");
}
else
System.out.print( "Joe");
10. if (a > 3 || b > 2)
System.out.print( "helen");
else
{System.out.print("Joe");
System.out.print( "nancy");
}
11. if (a > 12 || b > 7 || c > 1)
{ System.out.print( "Central");
}
else
System.out.print( "High");
System.out.println("School");
13. if (a % b ==1 || c > 6)
{System.out.print( "Joe");
System.out.print( "Tom");
}
else
System.ou.prinln("Test");
14. if (b < 3)
{System.out.print( "Tom");
System.out.print( "Joe");
}
else
System.out.print("Mike");
15. if (a < b || a > c)
System.out.print( "Helen");
else
{System.out.print( "Debbie");
System.out.print("George");
}
16. if ( c > b && c > a)
System.out.print( "Tom");
if ( c < 4)
{System.out.print( "Mike");
System.out.print( "Fred");
}