Unit 8 Project 8 My Solutions Create a program that prompts the user to enter his or her year in school--freshman, sophomore, junior, or senior. The input will be a string. Use the switch/case structure to determine which daytinals will be given for each group ---Monday for freshmen, Tuesday for sophomores, Wednesday forjuniors, and Thursday for seniors. NOTE: this platform does not allow the use of the MATLAB built in "input" function yet, so you will have to change manually your input in the field that says "How to call a function e.g. X = "freshman' or x = 'senior
Function Save Reset DI MATLAB Documentation i function x = my Function(x) 2 year a 3 switch 4 case .5 day="Monday: 6 case 7 8 case 9 10 case 11 12 otherwise 13 day 14 end 15 disp('Your 16 end
Code to call your function Reset 1 % * = input("Enter the name of your year in school: ','S'); 2 x = input('Senior', 's'); Enter the option manually and run the script 3 myFunction(x); Run Function
Unit 8 Project 8 My Solutions Create a program that prompts the user to enter his or her year in school--freshman, sopho
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Unit 8 Project 8 My Solutions Create a program that prompts the user to enter his or her year in school--freshman, sopho
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!