+ 1
What is the output in this code? And how?
int result =0; for (int i=0;i<5;i++) { If (i==3){ result + = 10; } else { result+=i; } System.out.println (resul) ;
1 Respuesta
+ 1
17
Value of result in every cycle 0+1+2+10+4
int result =0; for (int i=0;i<5;i++) { If (i==3){ result + = 10; } else { result+=i; } System.out.println (resul) ;