Answered step by step
Verified Expert Solution
Question
1 Approved Answer
% 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started