Integer Division and Modulus
What is printed as a result of executing the following code segment?
int x = 15;
int y = 4;
System.out.print(x / y);
System.out.print(" ");
System.out.println(x % y);
A
3.75 3
B
4 3
C
3 3.75
D
3 3
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | zgj07310417 | 0 | 1 | 0m 28s | -38 |
| #2 | charliecao121159 | 1 | 2 | 3m 44s | -134 |
| #3 | lsj08030922 | 1 | 1 | 12m 19s | -639 |
Items per page:
10
1 – 3 of 3
