+ 1
Help with something Java related
Hi, I was solving a quiz in Sololearn when I came across this code. I couldnât figure out the output for this code , I mean I couldnât figure out how that output came.
3 RĂ©ponses
+ 7
Looks like you'll get help from this thread:
https://www.sololearn.com/Discuss/1018292/help-with-code
+ 1
Thanks
0
int result=0
for(int i=0; i<5; i++)
{
if(i==3)
{
result +=10;
}
else
result +=i;
}
System.out.print(result);