Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

I'm having trouble with this C++ assignment I need to write a program that uses a random number generator to generate a two digit positive

I'm having trouble with this C++ assignment I need to 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 below:

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 with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions