program matrix
   implicit none
   integer::N
   integer,dimension(:,:),allocatable::x
   
   write(*,*) "can I have an integer N please?"
   read(*,*) N
   allocate(x(1:N,1:N))
   open(10,file='matrix.dat')
   read(10,"(5i4)") x
   write(*,"(5i4)") x
end program
