Question: Only 23 , please do it using Matlab Scanned b Programming Style ranforce -randi (to, 12) evitch ranforce case 0 disp( There is no wind)
Only 23 , please do it using Matlab Scanned b Programming Style ranforce -randi (to, 12) evitch ranforce case 0 disp( There is no wind) case 1,2,3,4,5,6 case 17,8,9) case 10,11) diep( There is a breeze') disp( This is a gale) disp(It ie a storm') diep( Hello, Hurricane!') case 12 end 23. Rewrite the following switch statement as one nested if-else statement lelseif clauses may be used]. Assume that there is a variable letter and that it has been initialized switch letter case 'x disp('Hello) displ Yes displ 'Quit . , disp ( ' Error' } case ['y' case 'Q otherwise end 24 Rewrite the following nested if-else statement as a switch statement that accomplishes exactly the same thing. Assume that num is an integer variable that has been initialized, and that there are functions 1,12, 13, and 14. Do not use any if or if-else statements in the actions in the switch statement, only calls to the four functions. else f nun 0 else end t4 (num) 2 (num) t3 (num) else end end Write a script areaMenu that wil print a list consisting of-cylinder,-'circle, and rectangle. It prompts the user to choose one, and then prompts the user 25
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
