+ 13
[Challenge] Real challenge! Letters/Numbers to binary!
Challenge: write a program that takes an input either a word or numbers If it is a word, print it, and find the list of numbers that corresponds to the word. A=1 B=2 ... z=26 so for the word Act the output would be 1320, a=1 c=3 t=20. The program should also take that number, convert it to binary and print that as well.If the input was numbers, then it just converts that number to binary. For the word: Act Output: Act 1320 10100101000 https://code.sololearn.com/ca9us93Wp3DT/?ref=app
13 Answers
+ 20
https://code.sololearn.com/chV7sIMm814p/?ref=app
+ 12
https://code.sololearn.com/ckX1B8TnUkqx/?ref=app
+ 11
Edit: I am adding Kotlin version.
https://code.sololearn.com/cFOwf1LcIYki/?ref=app
https://code.sololearn.com/c7t8pfHH2B07/?ref=app
+ 9
Here's my work on it, hope it meets the requirements, took me a while to do, it's a nice challenge. Thanks : )
https://code.sololearn.com/c3KnZI1gnlv5/?ref=app
+ 5
+ 5
Here is my compressed version.
https://code.sololearn.com/WPYOvtqo4T93/?ref=app
+ 4
Keep it complicated...with c++^^
https://code.sololearn.com/cHYuEomdCUcE
+ 4
My try with Java. I hope it works with any words.
https://code.sololearn.com/cIsX4Zx1K1RF/#java
0
How does that pigeon guy do everything in just one line?