Question: C++ WORK: Write a program to read one 3-digit integer number (from 100 to 999) from the console. If you consider each digit of the

C++ WORK:

Write a program to read one 3-digit integer number (from 100 to 999) from the console. If you consider each digit of the number represented by the letters A, B, and C; we can label the number as ABC.

Your program should:

Make sure the user enters the appropriate type of number

And fits in the right range

Strip each digit A, B, and C from the number

Example: User enters 452: A should be 4; B should be 5; C should be 2;

Hint#1: whats the integer division of 452/100?

Hint#2: the modulo operator (%) is also quite handy!

Form the numbers ABC, BCA, and CAB and store them to variables named accordingly.

From example above: ABC should be 452; BCA should be 524; CAB should be 254;

Find the remainders of each of the numbers ABC, BCA, and CAB when divided by 11. Store these remainders to variables named X, Y, and Z respectively.

Find and store the sums X+Y, Y+Z, and Z+X. For discussion sake, well refer to each of these sums as P, R, and Q respectively.

Your program should provide a formatted printout of all the computed numbers and sums. Your program should display a welcome message and prompt the user to enter the required numeric input. Your program should also prevent the user from entering anything but a 3-digit number, and continue to ask the user for an appropriate input until they enter one. C++ WORK: Write a program to read one 3-digit integer number (from

Program Description Write a program to read one 3-digit integer number (from 100 to 999) from the console. If you consider each digit of the number represented by the letters A, B, and C; we can label the number as ABO. Your program should: Make sure the user enters the appropriate type of number o And fits in the right range Strip each digit A, B, and C from the number Example: User enters 452: A should be 4; B should be 5; C should be 2; Hint#1: what's the integer division of 452/10O? Hint#2: the modulo operator (%) is also quite handy! o o Form the numbers ABC, BCA, and CAB and store them to variables named accordingly. o From example above: ABC should be 452; BCA should be 524; CAB should be 254; Find the remainders of each of the numbers ABC, BCA, and CAB when divided by 11. Store these remainders to variables named X, Y, and Z respectively. Find and store the sums X+Y, Y+Z, and Z+X. For discussion sake, we'll refer to each of these sums as P, R, and Q respectively. Your program should provide a formatted printout of all the computed numbers and sums. Your program should display a welcome message and prompt the user to enter the required numeric input. Your program should also prevent the user from entering anything but a 3-digit number, and continue to ask the user for an appropriate input until they enter one

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!