+ 1
A number a is a power of b if it is divisible by b and a/b is a power of b write a function called is_power
2 Answers
+ 1
You have to provide some test cases so i can check my answer but from your description, i think a number 2 is the power of 5 if
console.log(((a,b) => !(a%b)&&!((a/b)%b))(2,5));
0
Show as your attempt
Hot today
I have made a calculator in which my % (Percentage) not work correctly for 100%50 or 100%20.
2 Votes
Python palindrome challenge.
1 Votes
Java
0 Votes
Number of Ones ( C++ ) question!
1 Votes