monteno

Untitled

Mar 29th, 2011
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DIM resultado AS STRING
  2. DIM res, num AS INTEGER
  3. 1 PRINT "Introduzca el Numero a Convertir"
  4. INPUT num
  5. IF num <= 1 THEN
  6.     PRINT num
  7. ELSE
  8.     resultado = STR$(1)
  9.     DO
  10.         res = (num MOD 2)
  11.         resultado = resultado + STR$(res)
  12.         num = (num \ 2)
  13.     LOOP UNTIL (num < 2)
  14.     PRINT resultado
  15. END IF
  16. GOTO 1
Advertisement
Add Comment
Please, Sign In to add comment