I basically need to get user input:
gets.chomp("input?")
And then to convert the given input to binary.
That's the part I don't get. :(
I basically need to get user input:
gets.chomp("input?")
And then to convert the given input to binary.
That's the part I don't get. :(
Try this.
a = gets.chomp
puts a.each_byte.map {|y| sprintf "%08b", y}.join " "