public static int run() {
int a = 9;
int b = 4;
int q = a / b;
int r = a % b;
return q * 10 + r;
}
// Call: System.out.println(run());What is printed?
- Acheck_circle
21
- B
23
- C
13
- D
11
Explanation
9/4 = 2, 9%4 = 1. 2*10 + 1 = 21.
AP Computer Science A· difficulty 3/5
public static int run() {
int a = 9;
int b = 4;
int q = a / b;
int r = a % b;
return q * 10 + r;
}
// Call: System.out.println(run());What is printed?
21
23
13
11
Explanation
9/4 = 2, 9%4 = 1. 2*10 + 1 = 21.
Want 10 more like this — adaptive to your weak spots?