Q:

Whether a storm is a tropical depression, tropical storm, or hurricane is determined by the average sustained wind speed

0

 Whether a storm is a tropical depression, tropical storm, or hurricane is determined by the average sustained wind speed. In miles per hour, a storm is a tropical depression if the winds are less than 38 mph. It is a tropical storm if the winds are between 39 and 73 mph, and it is a hurricane if the wind speeds are >= 74 mph. Write a script that will prompt the user for the wind speed of the storm, and will print which type of storm it is. 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Ch4Ex21.m

% Prints whether a storm is a tropical depression, tropical

% storm, or hurricane based on wind speed

wind = input('Enter the wind speed of the storm: ');

if wind < 38

 disp('Tropical depression')

elseif wind >= 38 && wind < 73

 disp('Tropical storm')

else

 disp('Hurricane')

end

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now