Question: in C please! 3. Write a function that takes two non-negative integer numbers and checks if one of them is a (positive integer) power of
3. Write a function that takes two non-negative integer numbers and checks if one of them is a (positive integer) power of the other one. It returns 1 if it is, and otherwise. Example: 2 and 8: 8 = 23, and the function returns 1 3 and 10: none of them is a power to another one, and the function returns 0; 49 and 7: 49 = 72, and the function returns 1. O and 25: Function returns 0. O and 0: Function returns 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
