Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Mad Libs - prompt the user for every CAPITALIZED word. Then, display the below t

ID: 3764498 • Letter: M

Question

Mad Libs - prompt the user for every CAPITALIZED word. Then, display the below text, replacing the capitalized word with the word the user typed in. You are free to use any variable type you wish unless specified (ie NUMBER (INT)).

Collect input and store it in an array.

The prompt and the user response must be on the same line.

Create at least 1 function to to handle the prompt and pass back the response.

The variables FAMOUS PERSON, OCCUPATION, and PREPOSI- TION must be able to hold multiple words.

Explanation / Answer

fid = fopen('infile.txt','rt') ; X = fread(fid) ; fclose(fid) ; X = char(X.') ; % replace string S1 with string S2 Y = strrep(X, S1, S2) ; fid2 = fopen('outfile.txt','wt') ; fwrite(fid2,Y) ; fclose (fid2) ;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote