Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~315 People Reached
Favorite Forums
Favorite Tags
c++ x 7
Member Avatar for mac.jpr

[CODE]#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; } [/CODE] i tried this …

Member Avatar for boddurakesh
0
314