Question: THis is C++. Write a program that prompts the user to enter the size of the rows and columns (between 2 and 5) for a

THis is C++. Write a program that prompts the user to enter the size of the rows and columns (between 2 and 5) for a matrix (2D array). The program will randomly fill the numbers 0 and 1 into the matrix, print the matrix, and output the minimum number of rectangles/squares that can cover all the 1 values in the matrix to the screen. The size of a rectangle/square is defined by the number of 1's in it. There may be two or more largest rectangles/squares of the same size, and values may "wrap around" or overlap to determine the size. Here are the rules in forming groups of ones

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!