Question: % Menu displaying names disp ( ' Menu: ' ) ; disp ( ' 1 . Your Name' ) ; disp ( ' 2 .

% Menu displaying names
disp('Menu:');
disp('1. Your Name');
disp('2. Your Father"s Name');
disp('3. Your Grandfather"s Name');
disp('4. Family Name');
% Ask the user to select a name
selection = input('Select a number from the menu: ');
% Assign the selected name based on user input switch selection
case 1
selected Name = 'Your Name';
case 2
selected Name = 'Your Father"s Name';
case 3
selectedName = 'Your Grandfather"s Name';
case 4
selected Name = 'Family Name';
otherwise
selected Name = 'Invalid Selection";
end
% Display the selected name in capital letters disp(['Selected Name in Capital Letters: ' upper(selectedName)]):
 % Menu displaying names disp('Menu:'); disp('1. Your Name'); disp('2. Your Father"s

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!