Using FOR...NEXT
Using WHILE...WEND
CLS
x = 1
y = 1
i = 1
PRINT x; y;
WHILE i <= 10
z = x + y
PRINT z;
x = y
y = z
i = i + 1
WEND
END
x = 1
y = 1
i = 1
PRINT x; y;
WHILE i <= 10
z = x + y
PRINT z;
x = y
y = z
i = i + 1
WEND
END
Using DO...LOOP
CLS
x = 1
y = 1
i = 1
PRINT x; y;
DO WHILE i <= 10
z = x + y
PRINT z;
x = y
y = z
i = i + 1
LOOP
END
x = 1
y = 1
i = 1
PRINT x; y;
DO WHILE i <= 10
z = x + y
PRINT z;
x = y
y = z
i = i + 1
LOOP
END
No comments:
Post a Comment
If you have any doubts, Please let me know.