Ask the user for a number between 3 and 100 (inclusive). USING LOOPS, figure out what is the largest power of 2 that is less than or equal to the number entered. For example, if the user entered 6, answer would be 4. If the user entered 100, the answer would be 64. You must do this within a function called powerOfTwo. For example: c++ In the answer I need Please enter a number from 3 to 100: 6 2, 4 The answer is 4
sample output:
Please enter a number from 3 to 100: 100
The answer is 64