Write a program that continues to prompt the user until the
Solution
% matlab code random month
while true
month = randi([1, 12]);
if month == 1
disp(\"January\ \");
elseif month == 2
disp(\"February\ \");
elseif month == 3
disp(\"March\ \");
elseif month == 4
disp(\"April\ \");
elseif month == 5
disp(\"May\ \");
elseif month == 6
disp(\"June\ \");
elseif month == 7
disp(\"July\ \");
elseif month == 8
disp(\"August\ \");
elseif month == 9
disp(\"September\ \");
elseif month == 10
disp(\"October\ \");
elseif month == 11
disp(\"November\ \");
elseif month == 12
disp(\"December\ \");
else
disp(\"Invalid month\ \");
end
choice = input(\"Do you want to continue(y or n)? \",\'s\');
if choice == \'n\'
break;
end
end
%{
output:
October
Do you want to continue(y or n)? y
January
Do you want to continue(y or n)? y
December
Do you want to continue(y or n)? y
December
Do you want to continue(y or n)? n
%}

