Cls Dim n as string Dim b as string b="Kamal" For a=5 to 1 step -1 n=left$(b, a) Print n Next a End
strText$ = "Some text to be underlined." CLS PRINT strText$ PRINT STRING$(LEN(strText$), "*")
cls a =1 for i = 1 to 5 print a; a = (a*10)+1 next i end
REMPATTERNS (not necessary) CLS FOR I = 1 TO 5 STEP +1 FOR J = 1 TO I STEP+1 PRINT J NEXT J PRINT NEXT I END Hope you find this helpful :)
10 cls 11 c = 0 20 for n =1 to 10 30 input"enter no.";a 40 c=c+a 50 next n 60 print c
CLS FOR eachNum%=1 TO 10 STEP 2 PRINT eachNum% NEXT
Cls Dim n as string Dim b as string b="Kamal" For a=5 to 1 step -1 n=left$(b, a) Print n Next a End
PRINT "What is your name ?" INPUT NAM$ CLS FOR N = 1 TO 10 PRINT NAM$ NEXT N
strText$ = "Some text to be underlined." CLS PRINT strText$ PRINT STRING$(LEN(strText$), "*")
cls input "enter a name"; a$ b=1 while b <=1 print a$ b = b+1 wend end
with line statement, we can also draw boxes. SCREEN 7 COLOUR 5, 15 CLS LINE(60,60)-(130,100),6,B the letter B indicates the box option
cls a =1 for i = 1 to 5 print a; a = (a*10)+1 next i end
REMPATTERNS (not necessary) CLS FOR I = 1 TO 5 STEP +1 FOR J = 1 TO I STEP+1 PRINT J NEXT J PRINT NEXT I END Hope you find this helpful :)
the extensions of qbasic are that, there are only 80 pixels to write in the qbasic
10 cls 11 c = 0 20 for n =1 to 10 30 input"enter no.";a 40 c=c+a 50 next n 60 print c
There are multiple ways to generate that particular string, several more than can be listed in one answer. For example: CLS PRINT "1 3 5" or CLS REM An easy "1 through 5, odds only" FOR loop. FOR X = 1 TO 5 STEP 2 PRINT X; NEXT X or even CLS INPUT "Please type in a number series with no line breaks (spaces okay):", numbers$ PRINT numbers$
CLS a = 0 b = 0 FOR i = 1 TO 10 IF a = 0 THEN f = 1 END IF PRINT f b = a a = f f = a + b NEXT i END from : Parth jani parthjani7@yahoo.com