mirror of https://github.com/01-edu/public.git
docs(ispowerof2): make subject clearer
Add definition of power of 2
This commit is contained in:
parent
2b77c87031
commit
ac9cf757a1
|
@ -2,7 +2,9 @@
|
|||
|
||||
### Instructions
|
||||
|
||||
Write a program that determines if a given number is a power of 2.
|
||||
Write a program that determines if a given number is a power of 2. A number `n` is a power of 2 if it meets the following condition: $n = 2 ^ m$ where m is another integer number.
|
||||
|
||||
For example, $4 = 2 ^ 2$ or $16 = 2 ^ 4$ are power of 2 numbers while 24 is not.
|
||||
|
||||
This program must print `true` if the given number is a power of 2, otherwise it has to print `false`.
|
||||
|
||||
|
@ -10,6 +12,8 @@ This program must print `true` if the given number is a power of 2, otherwise it
|
|||
|
||||
- When there is only one argument, it will always be a positive valid `int`.
|
||||
|
||||
|
||||
|
||||
### Usage :
|
||||
|
||||
```console
|
||||
|
|
Loading…
Reference in New Issue