Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions