10 REM Qbasic Program to convert decimal number into binary number
20 CLS
30 INPUT "enter decimal number"; d
40 WHILE d <> 0
50 r = d MOD 2
60r$ = STR$(r)
70 s$ = r$ + s$
80 d = d \ 2
90 WEND
100 PRINT "binary number is"; s$
110 END
120 Ok
Run
20 CLS
30 INPUT "enter decimal number"; d
40 WHILE d <> 0
50 r = d MOD 2
60r$ = STR$(r)
70 s$ = r$ + s$
80 d = d \ 2
90 WEND
100 PRINT "binary number is"; s$
110 END
120 Ok
Run
Comments
Post a Comment
share your thoughts ....