CHALLENGE ACTIVITY
3.16.1: String access operations.
398878.2811934.qx3zoy7
Jump to level 1
1 0 2 0 3 0
Given string inputText on one line and integer strIndex on a second line, output 'Matching' if the character at index strIndex of inputText is 'r'. Otherwise, output 'Not matching'. End with a newline.
Ex: If the input is "threw" 2
then the output is:
Matching
Note: Assume the length of string inputText is greater than strIndex.
#include <iostream>
#include <string>
using namespace std;
int main() {
string inputText;
int strIndex;
getline(cin, inputText);
cin >> strIndex;
/* Your code goes here */
return 0;
}