Java Arithmetic Operations
What is the value of d after the following code segment has been executed?
int a = 2 + 3 * 4;
int b = (a - 5) / 3;
int c = a % b;
double d = a + b + c;
A
17.0
B
19.0
C
23.0
D
21.0
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | busemagngr | 2 | 2 | 0m 28s | 172 |
| #2 | ngvandangthanh | 1 | 1 | 0m 00s | 100 |
| #3 | l.alzahrani04 | 1 | 1 | 0m 00s | 100 |
| #4 | deepanpalanisamy32 | 1 | 1 | 0m 29s | 71 |
| #5 | richa.tuli | 0 | 1 | 0m 01s | -11 |
| #6 | lsj08030922 | 1 | 2 | 3m 27s | -117 |
Items per page:
10
1 – 6 of 6
