Write a program that computes and displays the charges for apatient's hospital stay. First, the program should ask if thepatient was admitted as an inpatient or an outpatient. If thepatient was an inpatient, the following data should be entered:
If the patient was an outpatient, the following data should beentered:
Use a single, separate function to validate that no input isless than zero. If it is, it should be reentered before beingreturned.
Once the required data has been input and validated, the programshould use two overloaded functions to calculate the total charges.One of the functions should accept arguments for the inpatientdata, while the other function accepts arguments for outpatientdata. Both functions should return the total charges.
Create one function that sends the output report to the screenand one other function that sends the exact, same report to a file.Call both functions so that the same output goes to the file andthe screen when the program is executed.
Write a program that computes and displays the charges for a patient's hospital stay. First, the program should ask if t
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am