Vijay you are right. I have been writing a code all night. Here is the whole question:

A matrix of order 3X3 or m X n in general is shown below.

4 5 8

3 9 11

7 3 6

The same matrix is written out in a liner, vertical fashion, row by row is shown below.

4

5

8

3

9

11

7

3

6

Take the case of 11. It is in the 2nd row and third column – or in general at (i, j) = (2, 3)

When written in the liner fashion, 11 is the 6th element in the sequence, or in general Nth

element

Can you derive a formula for I and j and write a program for finding the i, j for the Nth element of the

liner sequence, given the order of the matrix is m X n?

OR

in other words, formulate i and j as a function of m, n and N

i = f(m, n, N)

j = f(m, n, N)

Thank you Daniel.