+ 1

problem plz help

my question is why if varible=0 then while varible <5 varible=varible+1 how this is posible the varible is =0 how is = varible +1 it make anoter varible .

12th Feb 2018, 11:32 AM
אור רגב
אור רגב - avatar
3 Answers
+ 1
variable=0 declares a variable called "variable" and stores the value 0 in it. while variable<5 starts a while loop and variable=variable+1 counts 0, 1, 2 etc. until it has reached 4, because the while loop executes while the value of the variable is smaller than 5.
12th Feb 2018, 12:10 PM
SQL Guy
0
why to put anoter varible if thers is alardy one
12th Feb 2018, 11:34 AM
אור רגב
אור רגב - avatar
0
use variable += 1
12th Feb 2018, 4:04 PM
Markus Kaleton
Markus Kaleton - avatar