+ 1

For statement question

When I try to run a program it says I need parenthesis after each ‘;’ in my for statement.... I swear the syntax for ‘for’ is for (init; condition; increment) https://code.sololearn.com/curJ4o5iRsO1/?ref=app

19th Sep 2018, 6:05 PM
Seth
2 Antworten
+ 6
Nothing serious for (int hour = 1; distance; // wrong hour <= time; hour++) 4 expressions instead of 3
19th Sep 2018, 6:33 PM
Babak
Babak - avatar
+ 1
hey i ended up getting rid of the distance; and it worked out thank you
19th Sep 2018, 8:26 PM
Seth