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 endRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.