Inactive Tutor answered 06/23/20
Tutor
New to Wyzant
x = 5*2 = 10
y = (10+1)%3 = 11%3 = 2
returns 8
Manjunath H.
asked 06/23/20int myFunction(int n) {
int x = n * 2;
int y = (x + 1) % 3;
return y - x;
}
Inactive Tutor answered 06/23/20
x = 5*2 = 10
y = (10+1)%3 = 11%3 = 2
returns 8
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.