Write a program that computes and displays the charges for apatient’s hospital stay. First,
the program should ask if the patient was admitted as an in-patientor an out-patient.
If the patient was an in-patient the following datashould be entered:
• The number of days spent in the hospital
• The daily rate
• Charges for hospital services (lab tests, etc.)
• Hospital medication charges.
If the patient was an out-patient the following data shouldbe entered:
• Charges for hospital services (lab tests, etc.)
• Hospital medication charges.
Use a single, separate function to validate that no input is lessthan zero. If it is, it should
be re-entered before being returned.
Once the
OR
OR