program testone
   implicit none
   integer:: i,j
   integer ,dimension(10,10)::mat

   mat=0
   do i=1,5
      mat(i,i)=i
   enddo
   
   open(10,file="matrix.txt")
   write (10,"(10i3)") mat
end program
