font "arial",10,100

input "Number to change to binary up to 1024 ",a

n=10

dim b(n+1)

do

if a-2^n>-1 then

b[n]=1

a=a-2^n

end if

n=n-1

until n<0

for x = 0 to 10

text 290-x*25+10,10,b[x]

text 290-x*25+10,30,b[x]*2^x

next x

Subscribe to:
Post Comments (Atom)

manuelnogueirasantos@gmail.com

## No comments:

## Post a Comment