Answer:
8
Step-by-step explanation:
By presuming the given codes as below:
- int i = 3;
- int j = 10;
-
- if((3*i) < j)
- i = i + 2;
-
- i = i+3;
Firstly, we have i equal to 3. When the i is multiplied with 3 and check if it is smaller than j in the if statement (Line 4), it will return true and there i is incremented by two (Line 5). At this point the i = 3 + 2 = 5
Next i is incremented again by three in Line 7. Hence the final value of i = 5 + 3 = 8