Question: write a C++ program that uses a random number generator to generate a two digit positive integer and allows the user to perform the following

write a C++ program that uses a random number generator to generate a two digit positive integer and allows the user to perform the following operations:

a- double the number,

b- reverse the digits of the number.

c- raise the number to the power of 2,3 or 4.

d- sum the digits of the number.

e- if the number is a two digit number, then raise the first digit to the power of the second digit.

f-if the number is a three digit numberand the last digit is less than or equal to 4, then raise the first two digits to the power of the last digit.

After performing an operation if the number is less than ten, add ten to the number, also after each operation determine if the number is prime. the program should be menue driven.

Queation number 6, chapter7 C++ proramming D.S.Malik 7th edition.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!