All pastes #381927 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-03-05 04:08 UTC
rendered paste body
Sub binario()

Dim numero As Integer
Dim binario As String
Dim flag As Boolean

flag = true

numero = Val(InputBox("Ingrese el numero a convertir en binario: "))

while flag
	if Int(numero/2) = 0 then
		flag = false
	end if
	binario = binario & (numero Mod 2)
	numero =  Int(numero / 2)
wend 

msgbox binario

End Sub