Question: Write a complete C++ program that does the following. (Programs that correctly carry out some of the tasks will receive partial credit.) The program asks

Write a complete C++ program that does the following. (Programs that correctly carry out some of the tasks will receive partial credit.)

The program asks the user to enter a positive integer n that is less than 100. If the user enters an incorrect value, the program terminates. The program next asks the user to enter n 2 strings to be stored in a 2-dimensional array with size n n. The program then reports the maximum number of times that it can find the string Kamil in any row or column of the array.

For example, if the user enters 4 for n and then enters the 16 strings:

Kamil Peter Dustin Kamil

Kamil Andrew Carl Phil

Rat Rat Rat Rat

Kamil Peter Dustin Kamil

The final output would be 3 because Kamil appears three times in the first column and no more than three times in any row or column.

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!