QUESTION IMAGE
Question
int a = 35;
int b = 13;
int c = 11;
if (a % b > c)
system.out.println(\totally\);
if (a + -2 * b < c)
system.out.println(\awesome\);
what is the output of the program?
totally awesometotallyawesome
Step1: Calculate a % b
$35\bmod{13}=9$
Step2: Check first if - condition
Since $9<11$, the first if - condition (a % b > c) is false, so "totally" will not be printed.
Step3: Calculate a + - 2 * b
$35+(-2)\times13=35 - 26 = 9$
Step4: Check second if - condition
Since $9<11$, the second if - condition (a + - 2 * b < c) is true, so "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