Question: C++ Given string inputText on one line and integer strIndex on a second line, output Match found if the character at index strIndex of inputText

C++ Given string inputText on one line and integer strIndex on a second line, output "Match found" if the character at index strIndex of inputText is 'r'. Otherwise, output "Match not found". End with a newline. Ex: If the input is: warmth 2 then the output is: Match found

Can someone explain why the code I've made on lines 12-17 input isn't working and how to fix it? Provided images of errors.

C++ Given string inputText on one line and integer strIndex on a

second line, output "Match found" if the character at index strIndex of

Jump to level 1 Given string inputText on one line and integer strlndex on a second line, output "Match found" if the character at index strlndex o inputText is 'r'. Otherwise, output "Match not found". End with a newline. Ex: If the input is: warmth 2 then the output is: Match found Note: Assume the length of string inputText is greater than strindex. 2: Compare output 3: Compare output Output differs. See highlights below. Special character legend \begin{tabular}{r|r|} \hline Input & time \\ Your output & Match found \\ Expected output & Match not found \end{tabular} 4: Compare output Output differs. See highlights below. Special character legend Your output Match found Expected output Match not found 5: Compare output \begin{tabular}{l|l} Input & leron \\ 2 \end{tabular}

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!