Question: % Menu displaying names disp ( ' Menu: ' ) ; disp ( ' 1 . Your Name' ) ; disp ( ' 2 .
Menu displaying names
dispMenu:;
disp Your Name';
disp Your Father"s Name';
disp Your Grandfather"s Name';
disp Family Name';
Ask the user to select a name
selection inputSelect a number from the menu: ;
Assign the selected name based on user input switch selection
case
selected Name 'Your Name';
case
selected Name 'Your Father"s Name';
case
selectedName 'Your Grandfather"s Name';
case
selected Name 'Family Name';
otherwise
selected Name 'Invalid Selection";
end
Display the selected name in capital letters dispSelected Name in Capital Letters: upperselectedName:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
