Answer to Question #154054 in C++ for Junior

Question #154054

Write a program that works as follows:

Prompt the user to enter a one dimensional array A with 3 integers.

Prompt the use to enter a two dimensional array B with 3*3 integers.

Check whether A is exactly a row or a column in B. 

Print the row index or column index of A in B, or -1 if B does not contain A. 

Sample

Input: (The grids are not part of input):

1 2 3 

                                           

1 1 7 

3 2 8 

9 3 6 

Output:

Column 1

 

Input: (The grids are not part of input):

1 2 3 

                                           

1 1 7 

3 2 8 

1 2 3 

Output:

Row 2

 

Input: (The grids are not part of input):

1 2 3 

                                           

1 1 7 

3 2 8 

1 9 3 

Output:

-1

 


1
Expert's answer
2021-01-06T05:05:17-0500
Dear Junior, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog