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

If voltage > 125, the message of “Warning: High voltage on line” will be display

ID: 3640310 • Letter: I

Question

If voltage > 125, the message of “Warning: High voltage on line” will be displayed;
If voltage < 105, the message of “Warning: Low voltage online” will be displayed;
If voltage is between 105 and 125, the message of “Line voltage is within tolerances”.

Could I get a code for this so that I can double check my work.
Thank you

Explanation / Answer

% input a voltage value volt = input ('input a voltage value : '); % if the voltage is larger than 125 if volt > 125 disp('warning: high voltage online ');%display the message % if the voltage is less than 105 elseif volt < 105 disp('warning: low voltage online ');%display the message % if the voltage is between 105 and 125 else disp('Line voltage is within the tolerances '); %display the message end