To convert decimal number into its equivalent binary number (Qbasic Code)

To convert decimal number into its equivalent binary number (Qbasic Code)
  • CLS
    INPUT "Enter decimal number"; d
    WHILE d <> 0
        a = d MOD 2
        d = d \ 2
        d$ = STR$(a)
        b$ = d$ + b$
    WEND
    PRINT "The required binary number is "; VAL(b$)
    END

Share :

Twitter
Back To Top

facebook main

counter

Powered by Blogger.