+ 2
Would n't num=2 be possible??? (in the given example)
2 Réponses
+ 13
//so here is your code , I found ☺
https://code.sololearn.com/c7vUnMSVbXt5/?ref=app
since the increment statement is "num = num+3;"
so initially starting with num = 1
since 1 < 6 , so 1 gets printed
& then num gets increased by 3 ... ie num=4
since 4 < 6 , so 4 gets printed
& then num gets again increased by 3 again , ie num = 7
but 7 is not < 6 , so loops stops
+ 2
Hi! It seems you forgot to share the example! And make sure to tag the language! Thanks 😊