Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

solve it in c++ program please i need the codes to copy and paste it in microsoft world so please type the codes here so

solve it in c++ program please
i need the codes to copy and paste it in microsoft world so please type the codes here so i can take them
image text in transcribed
image text in transcribed
The department of History has just bought a new photocopier. Any person using the photocopier must enter his/her type and an identification code. You have been asked to do the following: Write a program that determines whether identification codes typed by users of a photocopier are valid, and prints appropriate messages. If the identification code, which is a four-digit number, is correct your program computes the cost of copying according to the table below. Your program should prompt the user for type, an identification code, and number of pages, read the information, and determine whether the code is valid or not. An identification code is valid if its rightmost digit is correct. A correct digit is equal to the remainder of the sum of the other three digits divided by 7. For example, a valid code that gives a correct digit is 7011 because (740+1) % 7-1. However, 9998 is not a valid code because (9+9+9) % 7-6 8. Write a program that reads the person's type (S, s, T, t, C, c, O, or o), person's code, and the number of pages. The program checks if the code is correct it calculates and prints the cost, while if the code is not correct it prints the message "Invalid code" and stops Correct digits are assigned as follows: Student (S): 1,2 (means 1 or 2) Number of 1 to 10 11 to 20 2

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

Database Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago