Question
Write a program that uses a random number generator to generate a two digit positive integer and allows the user to perform one or more
Write a program that uses a random number generator to generate a two digit positive integer and allows the user to perform one or more of the following operations:
1. Double the number
2. Reverse the digits of the number
3. Raise the number to the power of 3
4. Sum the digits of the number
5. If the number is a two digit number, then raise the first digit to the power of the second digit
6. If the number is a three digit number and the last digit is less tha or equal to 4, then raise the first two digits to the power of the last digit.
Each successive operation should be performed on the numer generated by the last operation. Your program should not contain any global variables and each of the these operations must be implement by a separate function. Your program should be menu driven.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started