QUESTION IMAGE
Question
what is the output of the program? int a = 10; int b = 3; int c = 17; if (a - b == c) system.out.println(\totally\); if (a + b * 6 > c) system.out.println(\awesome\);
Step1: Evaluate first condition
Given a = 14, b = 3, c = 17. Calculate a - b, which is 14 - 3=11. Since 11 != 17, the first if (a - b == c) condition is false and "totally" will not be printed.
Step2: Evaluate second condition
Calculate a + b 6, which is 14+3 6=14 + 18 = 32. Since 32>17, the second if (a + b * 6>c) condition is true and "awesome" will be printed.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
awesome