Primitive Type Arithmetic Operations
What is the value of result after the following code segment is executed?
int x = 8 / 3;
int y = 8 % 3;
int z = x * y + y;
double result = z - x / 2.0;
A
7.0
B
5.0
C
9.0
D
6.0
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | thewrizzler6 | 1 | 1 | 0m 00s | 100 |
| #2 | jeonsaw1723 | 1 | 1 | 0m 21s | 79 |
| #3 | patrickmeijer009 | 1 | 1 | 1m 08s | 32 |
| #4 | parth.taur227 | 1 | 1 | 1m 23s | 17 |
| #5 | nael.elbatji | 0 | 1 | 0m 00s | -10 |
| #6 | anthonygraves157 | 0 | 1 | 0m 41s | -51 |
| #7 | bommasam000 | 1 | 1 | 4m 04s | -144 |
| #8 | lsj08030922 | 1 | 1 | 13m 31s | -711 |
Items per page:
10
1 – 8 of 8
APFIVE