Page 1 of 1

C++ Problem Statement: in C++ Write a program that computes and displays the charges for a patient’s hospital stay. Firs

Posted: Sun Jul 03, 2022 12:01 pm
by answerhappygod
C++ Problem Statement:in C++ 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 in-patient or an out-patient. If thepatient was an in-patient, the following data should beentered:
• The number of days spent in the hospital• The daily rate• Hospital medication charges• Charges for hospital services (lab tests, etc.)
The program should ask for the following data if the patient wasan out-patient:
• Charges for hospital services (lab tests, etc.)• Hospital medication charges
The program should use two overloaded functions to calculate thetotal charges. One of the functions should accept arguments for thein-patient data, while the other function accepts arguments forout-patient information. Both functions should return the totalcharges.
Input Validation: Do not accept negative numbers for anydata.