To convert decimal number into its equivalent octal number. (Qbasic Code)
- CLS
INPUT "Enter decimal number"; a
WHILE a <> 0
r = a MOD 8
a = a \ 8
b$ = STR$(r) + b$
WEND
PRINT "The equivalent octal number is "; VAL(b$)
END