C ++ program to check if given number is power of 4 or not
#include <bits/stdc++.h> NEW_LINE using namespace std ; int isPowerOfFour ( int n ) { return ( n > 0 and pow ( 4 , int ( log2 ( n ) / log2 ( 4 ) ) == n ) ) ; }