in order to use a matrix whose dimensions are not known beforehand u can use an allocatable matrix, eg:
program
.
real, allocatable :: a(:,:)
.
.
.
.
allocate ( a(3,6) )
.
end
this creates a matrix and u get to give the dimensions u want later on. it could be like this:
program
integer...