Question: Write a simple program in C + + to collect data from the user, validate it , do the required computations, and display the results.

Write a simple program in C++ to collect data from the user, validate it, do the required computations, and display the results.
Scenario:
1. The program produces a receipt . It requires the following information (data entry) from the user:
Customer first name, customer last name, customer credit card name (Visa, Mastercard, etc.), credit card expiration year, credit card expiration month, credit card number, type of gas (regular, premium), number of gallons you purchase
2. The program validates the expiration year It will accept any year including and after 2023 and rejects any year prior to 2023). If the entry is rejected it will request re-enter.

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 Programming Questions!