+ 1

Can someone help me with this?

What is the output of this code? int result = 0; for (int i = 0; i < 5; i++) { if (i == 3) { result += 10; } else { result += i; } } System.out.println(result);

23rd May 2017, 6:47 AM
Abdiqani Mohamed
Abdiqani Mohamed - avatar
3 Answers
+ 6
18
23rd May 2017, 6:52 AM
#Happy@777
#Happy@777 - avatar
+ 5
@james u r right its 17....👍👍👍
23rd May 2017, 6:56 AM
#Happy@777
#Happy@777 - avatar