Answered step by step
Verified Expert Solution
Question
1 Approved Answer
hello, can you Write a C program for each question and give some comments regarding the programs? Q1) Answer each question correctly A) As a
hello, can you Write a C program for each question and give some comments regarding the programs?
Q1) Answer each question correctly A) As a biomedical engineer, you are requested by hospital top management to create a computer software of patient registration system to improve the nurse efficiency to replace the manual paper-based registration. Write a C program to register, display and save patient information by performing the following steps (use switch case to select among the steps): 1. input Patient Information which includes 1. Patient ID number 2. Patient Name 3. Patient Address 4. Patient contact No 5. Patient Room. 2. Display patient Information in screen. 3. Save patient information in file called Patient.txt. You could refer to the following print screen as your reference and validate your program using the same input. Enter 2 for Display Patient Information Enter 3 for Save Patient Information in file Enter Any Other Char to exit 1 Please Enter Patient ID A123 Please Enter Patient Name Alan_Ali Please Enter Patient Address Suliamani, Baxtyari Please Enter Patient Contact Number 07702345676 Please Enter Patient Room B23 ++++++++++++++++++++++++++++++++++++++++++++++++ +++++++ +++++++++++++++++++++++++ Enter 1 for Input Patient Information Enter 2 for Display Patient Information Enter 3 for Save Patient Information in file Enter Any Other Char to exit 2 +++++++++++++++ +++++++++++++++++++++++++++ +++++++++++ Patient Information ++++++++++++++++ ++++++++++++++++++++ ++++++++++++++++ Patient ID A123 Patient Name Alan_Ali Patient Address: Suliamani, Baxtyari Contact Number : 07702345676 Patient Room : B23 +++++++++++++ +++++++++ ++++++++++ Enter 1 for Input Patient Information Enter 2 for Display Patient Information Enter 3 for Save Patient Information in file Enter Any Other Char to exit 3 Patient Information are Saved in File ++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++ Enter 1 for Input Patient Information Ente for Display Patient In tion Enter 3 for Save Patient Information in file Enter Any Other Char to exit 4 Exit from Program B) Write a C program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions: - getScore - This function asks the user for a test score, store it in a reference parameter variable, and validate it. For input validation, do not accept test scores lower than 0 or higher than 100 (use while loop for input scores). This function should be called by main () once for each of the five scores to be entered. - calcAverage - This function calculates and display the average of the four highest score. This function should be called just once by main 0, by should be passed the five scores. findLowest - This function finds and returns the lowest of the five scores passed to it. It should be called by calcAverage function, which uses the function to determine which of the five scores to drop, You could refer to the following print screen as your reference and validate your program using the same input. Score please enter 87 please enter 1-30 Score It is an Invalid Score! please enter a Score 145 please enter a Score 56 please enter Score 98 please enter a Score 110 It is an Invalid Score ! please enter a Score 11 The average of the four highest score - 71Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started