Using an if structure write a MATLAB script that will take a

Using an if structure, write a MATLAB script that will take any two numbers as keyboard input from the user and display. The higher number is . If the numbers are equal, the script should display The numbers are equal.

Solution

x = 10 ;

y = 20 ;

if (x > y )

    disp ( \' higher number is x \')

elseif ( x = y )

    disp ( \' the numbers are equal \' )

else

    disp ( \' higher number is y \' )

end

 Using an if structure, write a MATLAB script that will take any two numbers as keyboard input from the user and display. The higher number is . If the numbers

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site