BASIC 编程/BASIC 入门/控制结构/WHILE...WEND
外观
< BASIC 编程
INPUT "What is your name"; UserName$
PRINT "Hello "; UserName$
DO
INPUT "How many stars do you want"; NumStars
Stars$ = ""
Stars$ = REPEAT$("*", NumStars) '<-ANSI BASIC
'Stars$ = STRING$(NumStars, "*") '<-MS BASIC
PRINT Stars$
DO
INPUT "Do you want more stars"; Answer$
LOOP UNTIL Answer$ <> ""
LOOP WHILE UCASE$(LEFT$(Answer$, 1)) = "Y"
PRINT "Goodbye ";
FOR A = 1 TO 200
PRINT UserName$; " ";
NEXT A
PRINT