- 5

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

need help

18th Jun 2017, 11:06 AM
Walter Mugo
Walter Mugo - avatar
6 Antworten
+ 4
Not only did you write the code in the title, you didn't even write the full code... and posted the same thing twice... How do you expect anyone to give an actual answer??
18th Jun 2017, 12:14 PM
Rrestoring faith
Rrestoring faith - avatar
+ 2
He could print the variable "Results" just after the if statement
18th Jun 2017, 11:52 AM
Limitless
Limitless - avatar
+ 2
Follow these 8 steps, it will help you get your answer. https://www.sololearn.com/Blog/38/8-simple-rules-to-get-help-from-the-community/
18th Jun 2017, 12:28 PM
Limitless
Limitless - avatar
+ 1
Please tag the code in the discription or in answers
18th Jun 2017, 11:40 AM
Limitless
Limitless - avatar
+ 1
there will be no output beacuse you didn't print anything.
18th Jun 2017, 11:44 AM
somesh bhinda
somesh bhinda - avatar
+ 1
I would recommend throwing it in Playgrounds and press Run
18th Jun 2017, 11:53 AM
Limitless
Limitless - avatar