mirror of https://github.com/01-edu/public.git
![aug.ornelas@gmail.com](/git/assets/img/avatar_default.png)
![Frenchris](/git/assets/img/avatar_default.png)
1 changed files with 19 additions and 0 deletions
@ -0,0 +1,19 @@ |
|||||||
|
# ispowerof2 |
||||||
|
## Instructions |
||||||
|
|
||||||
|
Write a function that determines if a given number is a power of 2. |
||||||
|
|
||||||
|
This function returns true if the given number is a power of 2, otherwise it returns false. |
||||||
|
|
||||||
|
Your function must be declare as follows: |
||||||
|
|
||||||
|
## Expected function |
||||||
|
|
||||||
|
```go |
||||||
|
|
||||||
|
func Ispowerof2(n uint) bool { |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
``` |
||||||
|
|
Loading…
Reference in new issue