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

. The following statements are intended to alert a user to dangerously high oral

ID: 2260934 • Letter: #

Question

. The following statements are intended to alert a user to dangerously high oral thermometer readings (values are in degrees Fahrenheit). Are the relational operators correct or incorrect? If incorrect correct them to cover the entire possible range of temperatures. Explain why they were wrong and correct them. Simplify the code into 1 if/end set of comparisons.

if temp < 97.5

disp('Temperature below normal');

end

if temp > 97.5

disp('Temperature normal');

end if temp > 99.5

disp('Temperature slightly high');

end

if temp > 103.0

disp('Temperature dangerously high');

end

This Is A Matlab Problem.

Explanation / Answer

the above code is wrong. the correct code is given below:

if temp > 103.0

disp('Temperature dangerously high');

else if temp > 99.5

disp('Temperature slightly high');

else if temp > 97.5

disp('Temperature normal');

else

disp('Temperature below normal');

end