Solve the following problems. 1) (2 pts) Your instructor will have people who ar
ID: 3604566 • Letter: S
Question
Solve the following problems. 1) (2 pts) Your instructor will have people who are caught using a cell phone in class write," I will not use a cell phone in class." You decide to get a jump on the project by writing a MATLAB script file caught in which you modify the will not use my cell phone in class" example to first prompt the user for the number of times the statement needs to be printed, then print it that many times. Include a line number in the output line (Hint: fprintf) to verify the correct number has been printed, e.g. 1. I will not use my cell phone in class. 2. I will not use my cell phone in class. After the last output, print The End :PExplanation / Answer
prompt = 'Enter how many times you want to print';
n = input(prompt)
j = 0;
for I=1:n
j = j + 1;
fprintf('%d . I will not use my cell phone in class ',j);
end
fprintf('The End:P);
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.