+ 6
Challenge: Transform the first 100 numbers in the binary number system
6 Réponses
+ 11
// In Java...
for(int i = 1; i <= 100; i++) {
System.out.println(i + " = " + Integer.toBinaryString(i));
}
+ 8
Not exactly the binary, but also octal and hex
# input 100
https://code.sololearn.com/cZ8qsrxo200c/?ref=app
+ 5
https://code.sololearn.com/cdj2UAgV26YF/?ref=app
+ 3
Python: (print(bin(i)) for i in range(1, 101))
Too lazy to implement my own algorithm for this.