Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In c++ I would like to get a rough estimate on how much tuition and fees will cost me this semester. While a paper, pencil,

In c++

I would like to get a rough estimate on how much tuition and fees will cost me this semester. While a paper, pencil, and calculator could do the trick, I would like for you to practice your use of integers, doubles, cin, cout, conditional branches(if/else), and loops to create a program that will calculate the total tuition.

To do:

First ask the user if they are a student: Are you a student?

If the answer is N (for no) exit the program. If the answer is Y (for yes) then ask the next question: How many classes are you taking?

If the user enters a value less than 1, continue on to printing the summary

Then ask the user: What is the cost per credit hour?

Then for each class ask the user: How many credit hours is class #x?

while the user enters a value less than 1, print "Classes must be at least 1 or more credits.", Then repeat the question

Are there any fees for class #x? If the answer is Y (for yes) then ask the next question: What is the total amount of fees for class #x?

You can assume the user will enter a double value greater than 0 for the fees

Print the summary and exit the program

The summary consists of the total number of credit hours, their cost, the total amount of fees, the subtotal, the tax rate (7.5%), and then the total. All monetary values must be printed using two decimal places.

Input:

image text in transcribed

Output displayed as:

image text in transcribed

5 215.55 3 200.00 3 Y 150.00 4. Y 200.00 1 n 1 47.65 Are you a student? How many classes are you taking? What is the cost per credit hour? How many credit hours is class 1? Are there any fees for class 1? What is the total amount of fees for class 1? How many credit hours is class 2? Are there any fees for class 2? What is the total amount of fees for class 2? How many credit hours is class 3? Are there any fees for class 3? What is the total amount of fees for class 3 ? How many credit hours is class 4? Are there any fees for class 4? How many credit hours is class 5? Are there any fees for class 5? What is the total amount of fees for class 5? SUMMARY Number of credit hours: 12 Cost per credit hour: 215.55 Fees: 597.65 Subtotal: 3184.25 Total: 3423.07

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

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

Recommended Textbook for

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions

Question

=+How will this affect the recruiting process?

Answered: 1 week ago