remaan
- 132
- 0
Homework Statement
In this problem I need to check if the input num. from the useer is a binary or Not.
And, then I need to convert this Binary Num. to Decimal.
The Attempt at a Solution
Now, for a number to be a Binary it should only contains 0s and 1s,
should I make an if statement ?
But, even if I make this if it will be so complex, because I have to check that every num. except 0 and 1 does not exist ?
Or, there is a method to check that ?
Last edited: