Page 1 of 1

Exercise 6: Complete the following code (switch-case statement) Write a script to convert the temperature from Fahrenhei

Posted: Mon May 02, 2022 11:47 am
by answerhappygod
Exercise 6 Complete The Following Code Switch Case Statement Write A Script To Convert The Temperature From Fahrenhei 1
Exercise 6 Complete The Following Code Switch Case Statement Write A Script To Convert The Temperature From Fahrenhei 1 (42.84 KiB) Viewed 54 times
Complete the MATLAB code by filling the blanks
Exercise 6: Complete the following code (switch-case statement) Write a script to convert the temperature from Fahrenheit to Celsius and vice versa clear cls; temp = input("input a temperature: "); unit = input("Do you want to convert to F or C: ", 's'); switch case {'f', 'F} (9/5) * temp + 32; fprintf("the temperature in F is %f \n", res) BEBER res = case res = 5/9 * (temp-32 fprintf HERE disp("wrong input") end