Write a program that reads a matrix, and afterwards prints the rows, the columns and the elements that are asked for.
Input consists of a matrix followed by a sequence of questions about
the matrix. The matrix is described with two natural numbers
and
,
followed by
lines with
integer numbers each one. Every question begins with the word
“row”, “column” or “element”. If
the word is “row”, it is followed by the number of a row.
If the word is “column”, it is followed by the number of a
column. If the word is “element”, it is followed by the
number of a row and the number of a column. All the given numbers of row
and of column are correct, and start with 1.
For every question, print the row, the column, or the element asked for.
Author: Unknown
Translator: Carlos Molina
Generation: 2026-01-25T10:35:09.647Z
© Jutge.org, 2006–2026.
https://jutge.org