Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 10 i = 1
- input "Enter ElAsas (2 for binary,8 for ocatal,16 for hexadecimal)";asas
- input "Enter Number: ";x
- rem log 2 (x)
- dimension = int(log(x)/log(asas))+3
- dim num(dimension)
- while x > 1
- num(i) = x mod asas
- x = int(x/asas)
- print x
- i = i + 1
- WEND
- num(i) = x
- print
- for m = dimension to 1 step -1
- if num(m) > 9 then
- print chr$(65+num(m)-10);
- else
- print num(m);
- end if
- next m
- print
- print
- print "---"
- goto 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement