0
I want to only print numbers up to 10 but my program prints it infinte please help i am in confusion
3 Réponses
+ 6
The structure of for loop is incorrect. This is what you did : for (i<=10;i++;)
Here, the i++ is considered as condition part.
You should make the for loop like this : for (;i<=10;i++) as initialization of counter 'i' is done already so keep the initialization part blank.
+ 1
Nova thanks
+ 1
You should accept Nova's answer with the tick, this gives him XP and lets other's know that is the answer which helped you, and works.