Program “range nilai” menggunakan QBASIC
20 CLS
INPUT "Masukan Nilai Anda : ", a
IF a >= 90 AND a <= 100 THEN
PRINT "A"
ELSEIF a >= 80 AND a < 90 THEN PRINT "B"
ELSEIF a >= 70 AND a < 80 THEN PRINT "C"
ELSEIF a >= 60 AND a < 70 THEN PRINT "D"
ELSEIF a < 60 THEN PRINT "E"
ELSE
PRINT "Wrong Input, Please Try Again"
END IF
INPUT "Ingin Masukan Nilai Lain ? (Y/N) ", N$
IF N$ = "Y" THEN 20
IF N$ = "N" THEN
GOTO 100
END IF
100 END
20 CLS
INPUT "Masukan Nilai Anda : ", a
IF a >= 90 AND a <= 100 THEN
PRINT "A"
ELSEIF a >= 80 AND a < 90 THEN PRINT "B"
ELSEIF a >= 70 AND a < 80 THEN PRINT "C"
ELSEIF a >= 60 AND a < 70 THEN PRINT "D"
ELSEIF a < 60 THEN PRINT "E"
ELSE
PRINT "Wrong Input, Please Try Again"
END IF
INPUT "Ingin Masukan Nilai Lain ? (Y/N) ", N$
IF N$ = "Y" THEN 20
IF N$ = "N" THEN
GOTO 100
END IF
100 END