Skip to main content

Java Topic Practice

Integer Division and Mod

Integer Division and Mod MCQ Practice

Question 1 of 15

Answered 0 of 15

Choose one answer.

What is printed by the following code segment?

int total = 18;
int bonus = 5;
int group = 3;
int result = (total + bonus) / group;
result = result * group + total % group;
System.out.print(result);
Choose one answer.