Question: Intro to C Programming Problem 3. Write a function that takes two non-negative integer numbers and checks if one of them is a (positive integer)
Intro to C Programming Problem
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 0 otherwise. Example: 2 and 8: 8 = 23, and the function returns 1 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. 0 and 25: Function returns 0. 0 and 0: Function returns 1. _Bool IsPowerof (unsigned int x, unsigned int y)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
