Question: C++ only please must not use arrays, only for loops and basic c++ with only using namespace std; and WARNING: You MUST use for loop

C++ only please must not use arrays, only for loops and basic c++ with only using namespace std; and

WARNING: You MUST use for loop to complete this exercise to receive points!

Write a program that accepts in input 2 strings of equal (but variable) length. Iterate through the strings, and count how many times the same letter appears at the same index. Fox example, if the strings are:

ABFBFAAT ABHBFRRI 

The program should output:

4 

Because the letters at index 0, 1, 3 and 4 match.

Any attempt to hard code answers will result in a 0 for the exercise.

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!