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
21.0
B
19.0
C
23.0
D
17.0
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | busemagngr | 1 | 1 | 0m 00s | 100 |
| #2 | ngvandangthanh | 1 | 1 | 0m 00s | 100 |
| #3 | l.alzahrani04 | 1 | 1 | 0m 00s | 100 |
| #4 | richa.tuli | 0 | 1 | 0m 01s | -11 |
| #5 | lsj08030922 | 1 | 2 | 3m 27s | -117 |
Items per page:
10
1 – 5 of 5
APFIVE