Using the definitions
write a procedure
that computes the number of rows rows and the number of columns cols of the smallest subrectangle with horizontal and vertical sides that contains all the occurrences of c in r.
Precondition
The character c occurs at least once in r, which is really a rectangle. That is, all rows have the same number of characters.
Observation You only need to submit the required procedure; your main program will be ignored.