Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

int a = 35; int b = 13; int c = 11; if (a % b > c) system.out.println(\…

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

Explanation:

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.

Answer:

awesome