Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Organize and support your main points

Answered: 1 week ago

Question

Move smoothly from point to point

Answered: 1 week ago

Question

Outlining Your Speech?

Answered: 1 week ago