M
M
Maxim Pritchin2018-06-14 17:53:33
Programming
Maxim Pritchin, 2018-06-14 17:53:33

How to generate a number?

How to generate a binary number 11 characters long
In any programming language

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lander, 2018-06-14
@pritchin_maxim1

It's very simple. You just need to generate an integer from 0 to 2047 (inclusive) and convert it to binary.

G
Griboks, 2018-06-14
@Griboks

You need to create an array of length 11 cells.

bit[] number = new bit[11];
print(number.length) //11
print(number) //00000000000

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question