Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ please Sample Run 1 Enter row size: 6 Enter column size: 7 0 1 0 3 1 6 1 0 1 6 8 6

C++ pleaseimage text in transcribed

Sample Run 1

Enter row size: 6

Enter column size: 7

0 1 0 3 1 6 1

0 1 6 8 6 0 1

5 6 2 1 8 2 9

6 5 6 1 1 9 1

1 3 6 1 4 0 7

3 3 3 3 4 0 7

The array has consecutive fours

Sample Run 2

Enter row size: 6

Enter column size: 7

0 1 0 3 1 6 1

0 1 6 8 6 0 1

5 6 2 1 8 2 9

6 5 6 1 1 9 1

1 3 6 1 4 0 7

5 5 5 3 4 0 7

The array does not have consecutive fours

(Pattern recognition: consecutive four equal numbers) Rewrite the isConsecutiveFour function in Programming Exercise using a vector as follows bool isConsecutiveFour(const vectorint >>& values) Write a test program like the one in Programming Exercise Programming Exercise (Pattern recognition: consecutive four equal numbers) Write the following function that tests whether a two-dimensional array has four consecutive numbers of the samee value, either horizontally, vertically, or diagonally bool isConsecutiveFour(int va1ues l[71 Write a test program that prompts the user to enter the number of rows and columns of a two- dimensional array and then the values in the array and displays true if the array contains four consecutive numbers with the same value. Otherwise, display false. Here are some examples of the true cases: 0 1 0 31 61 0 1 6 8 6 01 5 6 2 1 8 2 9 6 5 6 1191 1 3 6 1 4 0 7 3 333 40 7 0 1 0 3 1 61 0 16 86 0 1 5 5 2 1 8 2 9 6 5 6 1191 1 5 6 1 4 07 3 5 3 3 4 07 0 1 0 31 61 0 1 6 8 60 1 5 6 2 1 6 2 9 6 5 6 6191 1 36 1 4 0 7 36 33 4 0 7 0 1 0 31 61 0 1 6 8 60 1 96 2 1 8 2 9 1 39 1 4 0 7 3 33940 7 (Pattern recognition: consecutive four equal numbers) Rewrite the isConsecutiveFour function in Programming Exercise using a vector as follows bool isConsecutiveFour(const vectorint >>& values) Write a test program like the one in Programming Exercise Programming Exercise (Pattern recognition: consecutive four equal numbers) Write the following function that tests whether a two-dimensional array has four consecutive numbers of the samee value, either horizontally, vertically, or diagonally bool isConsecutiveFour(int va1ues l[71 Write a test program that prompts the user to enter the number of rows and columns of a two- dimensional array and then the values in the array and displays true if the array contains four consecutive numbers with the same value. Otherwise, display false. Here are some examples of the true cases: 0 1 0 31 61 0 1 6 8 6 01 5 6 2 1 8 2 9 6 5 6 1191 1 3 6 1 4 0 7 3 333 40 7 0 1 0 3 1 61 0 16 86 0 1 5 5 2 1 8 2 9 6 5 6 1191 1 5 6 1 4 07 3 5 3 3 4 07 0 1 0 31 61 0 1 6 8 60 1 5 6 2 1 6 2 9 6 5 6 6191 1 36 1 4 0 7 36 33 4 0 7 0 1 0 31 61 0 1 6 8 60 1 96 2 1 8 2 9 1 39 1 4 0 7 3 33940 7

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

Database Technology And Management Computers And Information Processing Systems For Business

Authors: Robert C. Goldstein

1st Edition

0471887374, 978-0471887379

More Books

Students also viewed these Databases questions

Question

3. Uncover needs:

Answered: 1 week ago