Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
27
Task/Loops-While/Creative-Basic/loops-while.basic
Normal file
27
Task/Loops-While/Creative-Basic/loops-while.basic
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
DEF X:INT
|
||||
|
||||
X=1024
|
||||
|
||||
OPENCONSOLE
|
||||
|
||||
WHILE X>0
|
||||
|
||||
PRINT X
|
||||
X=X/2
|
||||
|
||||
ENDWHILE
|
||||
'Output starts with 1024 and ends with 1.
|
||||
|
||||
'Putting the following in the loop will produce output starting with 512 and ending with 0:
|
||||
'X=X/2
|
||||
'PRINT X
|
||||
|
||||
PRINT:PRINT"Press any key to end."
|
||||
|
||||
'Keep console from closing right away so the figures can be read.
|
||||
WHILE INKEY$="":ENDWHILE
|
||||
|
||||
CLOSECONSOLE
|
||||
|
||||
'Since this is, in fact, a Creative Basic console program.
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue