```
#include<iostream>
#include<math.h>
using namespace std;
main()
{
int i;
float j=1.00;
cout<<"enter a no"<<endl;
cin>>i;
float k=(float)(log (i)/log(2));
k=k%j;//------------------error-------… "%" cann`t take float vlaue.
if(k==0.00)
cout<<"no "<<i<" is a power of 2"<<endl;
else
cout<<"sorry ! i am afraid "<<i<<" is not a power of 2"<<endl;
}
```

i tried this but error.

i stuck in one more problem weather a result is integer or not.