simply prints an error message. The script should use a nested if-else statement to accomplish this. Re-write the areaMenu script to use a switch...
View the step-by-step solution to:

Question

This question was created from ITEC2600 A1 https://www.coursehero.com/file/23635210/ITEC2600-A1/

23635210-314431.jpeg
23635210-314431.jpeg

simply.r prints an error message. The script should use a nested if-else statement to accomplish this. Re-Wl'ite the armMenu script to use a switch statement to decide which area to calculate. Here are the examples of running it (units are assumed to he inches).
>> areaMenu Menu 1. Cylinder 2. Circle 3. Rectangle Please choose one: 3 Enter the length: 4 Enter the width: 6 The area is 24.00

Top Answer

fprintf('1) Cylindern') fprintf('2) Circlen') fprintf('3) Rectanglen') user_input = input('You Choice? : '); a = -1; if... View the full answer

WhatsApp Image 2019-06-03 at 12.36.00 PM.jpeg

1. Cylinder
2. Circle
3. Rectangle
Please choose one : 1
Enter the height of the cylinder: 5
Enter the radius of the cylinder: 5
Area = 314.16
>> untitled
1. Cylinder
2. Circle
3. Rectangle...

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question