You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

305 B

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


func Ispowerof2(n uint) bool {	

}