Question: Given an integer, write a function to determine if it is a power of two. Demonstrate the function in a program that prompts the user
Given an integer, write a function to determine if it is a power of two. Demonstrate the function in a program that prompts the user to enter an integer, and employs the function to check it. The function prototype is as follows.
bool isPowerOfTwo(int);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
