PROGRAM matrice IMPLICIT NONE INTEGER, PARAMETER :: n = 9 REAL, DIMENSION(n,n) :: A, B, C INTEGER, DIMENSION(n) :: v INTEGER :: i, j DO i=1,n DO j=1,n A(i,j)=REAL(i*10+j) END DO END DO OPEN(11,FILE='matrice.dat',STATUS='replace') DO i=1,n WRITE(*,*) A(i,:) WRITE(11,*) A(i,:) END DO CLOSE(11) A=0.0 v=(/(REAL(i),i=1,n)/) B = SPREAD(v,DIM=1,NCOPIES=n) C = SPREAD(v,DIM=2,NCOPIES=n) A=B+C*10 DO i=1,n WRITE(*,*) A(i,:) END DO END PROGRAM matrice