int a = 17;
int b = 5;
System.out.println(a % b);What is printed?
- Acheck_circle
2
- B
3
- C
3.4
- D
0
Explanation
17 % 5 returns the remainder of 17 / 5, which is 2 (since 5 * 3 = 15 and 17 - 15 = 2).
AP Computer Science A· difficulty 2/5
int a = 17;
int b = 5;
System.out.println(a % b);What is printed?
2
3
3.4
0
Explanation
17 % 5 returns the remainder of 17 / 5, which is 2 (since 5 * 3 = 15 and 17 - 15 = 2).
Want 10 more like this — adaptive to your weak spots?