Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DIM resultado AS STRING
- DIM res, num AS INTEGER
- 1 PRINT "Introduzca el Numero a Convertir"
- INPUT num
- IF num <= 1 THEN
- PRINT num
- ELSE
- resultado = STR$(1)
- DO
- res = (num MOD 2)
- resultado = resultado + STR$(res)
- num = (num \ 2)
- LOOP UNTIL (num < 2)
- PRINT resultado
- END IF
- GOTO 1
Advertisement
Add Comment
Please, Sign In to add comment