Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hospital Charges ASSIGNMENT: Write a program to calculate and display the amount of the charges for a hospital stay. Create a global constant for the

Hospital Charges

ASSIGNMENT:

Write a program to calculate and display the amount of the charges for a hospital stay. Create a global constant for the daily fee of a hospital room ($350.00/day). Ask the user for:

The number of days spent in the hospital

The amount of the medication charges

The amount of the surgical charges

The amount of the lab fees

The amount of the physical rehabilitation charges

Then, using functions, calculate the stay charges (number of days * daily fee for the room), the miscellaneous charges (the total of the medication, surgical, lab, and physical rehabilitation charges), and the total charges. Finally, using a 4th function, display the charges.

There is no validation in this program.

Example Run #1: (bold type is what is entered by the user)

Enter the number of days spent in the hospital: 3

Enter the amount of the medication charges: $125.00

Enter the amount of the surgical charges: $500.00

Enter the amount of the lab fees: $400.00

Enter the amount of the physical rehabilitation charges: $0.00

The cost of the hospital stay is $xxxx.xx

The cost of the miscellaneous charges is $xxxx.xx.

The total cost of the hospital stay is $xxxx.xx.

The example run shows EXACTLY how your program input and output will look.

Write in C, with printf and scanf statements. And using constants and functions where needed.

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

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions

Question

Calculate the missing values

Answered: 1 week ago

Question

Distinguish between formal and informal reports.

Answered: 1 week ago