+ 2
I don't get how the following code produces 3 even when a single increment has been set. That's not the case with other values.
2 odpowiedzi
+ 3
Because u are using while loop which will add one three time to number variable
+ 3
In the while loop, 1 will be added until number is 3. If you input a value >= 3, the while loop wil not be executed, instead the number will be returned as it is