You are on page 1of 1

Write a program that fills a 4 x 4 matrix of integers.

The matrix must be a static


matrix; its size must be fixed at compile-time. Display the contents of the matrix.
Query the user for an integer. Pass the matrix and the integer to a bool function
that searches for the first occurrence (and only the first occurrence) of the
integer in the matrix. If the integer is found, the function returns true and
passes back the row and column coordinates of the first occurrence of the integer
using appropriate parameters; if not, the function returns false. Main then
displays whether the integer was found in the matrix and if so, the coordinates of
the first occurrence. The use of break to exit a loop or a function should be avoid
and will be penalized. Solutions that do not use a static matrix are unacceptable.
Solutions that do not use a bool function as described are unacceptable.
Unacceptable solutions will be returned and must be fixed and resubmitted.

You might also like