Home / Expert Answers / Computer Science / c-format-given-string-inputstr-on-one-line-and-integer-strindex-on-a-second-line-output-34-matchin-pa622

(Solved): c++ format: Given string inputStr on one line and integer strIndex on a second line, output "Matchin ...



c++ format: Given string inputStr on one line and integer strIndex on a second line, output "Matching" if the character at index strindex of inputStr is 'i. Otherwise, output "Not matching". End with a newline. Ex: If the input is: weigh 2 then the output is: Matching Note: Assume the length of string inputStr is greater than strIndex. 1 #include 2 #include 3 using namespace std; 4 5 int main() { 6 7891612134 10 string inputStr; int strIndex; getline (cin, inputStr); cin >> strIndex; /* Your code goes here */ return 0;

student submitted image, transcription available below
Given string inputStr on one line and integer strindex on a second line, output "Matching" if the character at index strindex of inputStr is T. Otherwise, output 'Not matching". End with a newline. Ex: If the input is: weigh 2 then the output is: Matching Note: Assume the length of string inputstr is greater than strindex. 1 include strindex; - Your code goes here.


We have an Answer from Expert

View Expert Answer

Expert Answer



We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe