Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using nested if structures, write a MATLAB script that will take the patient\'s

ID: 3923491 • Letter: U

Question

Using nested if structures, write a MATLAB script that will take the patient's temperature (in degree F) as keyboard input from the user. If the patient's temperature is higher than normal (> 98.6), display The patient has a fever! and ask the user to input (at the keyboard) the patient's white blood cell count (in leucocytes/microliter). Then, if the white blood cell count is greaterthanorequalto 10500, display the message Antibiotics should be prescribed!; otherwise, display the message Take two aspirin and call me in the morning.

Explanation / Answer

temp=input('enter temperature in °F');
if(temp>98.6)
fprintf('the patient has a fever !');
count=input('enter white blood cell count in leucocytes/microliter : ');
if(count>=10500)
fprintf('antibiotics should be prescribed');
else
fprintf(' take two aspirin and call in morning...');

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote