what is the output of the program? int a = 10; int b = 3; int c = 17; if (a - b == c) system.out.println(\tot…

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\);

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\);

Answer

Explanation:

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.

Answer:

awesome