INTEGER,DIMENSION(:,:),ALLOCATABLE :: a INTEGER :: m,n READ(*,*) m,n ALLOCATE(a(m,n)) : DEALLOCATE(a)