To convert octal number into its equivalent decimal number. (Qbasic Code)

To convert octal number into its equivalent decimal number. (Qbasic Code)
  • CLS
    INPUT "Enter octal number"; n
    WHILE n <> 0
        r = n MOD 10
        d = d + r * 8 ^ p
        p = p + 1
        n = n \ 10
    WEND
    PRINT "The equivalent decimal number is "; d
    END

Share :

Facebook Twitter Google+
Back To Top

facebook main

counter

Powered by Blogger.