25.06.2013 Views

Il Linguaggio Fortran 90/95

Il Linguaggio Fortran 90/95

Il Linguaggio Fortran 90/95

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5.17 Overloading 2<strong>95</strong><br />

WRITE(*,200) (A(i,j),j=1,3)<br />

END DO<br />

PRINT 100, "Matrice B:"<br />

DO i=1,3<br />

WRITE(*,200) (B(i,j),j=1,3)<br />

END DO<br />

PRINT 100, "Vettore c:"<br />

WRITE(*,*) (c(i),i=1,3)<br />

dim=21<br />

PRINT 100, "Matrice Prodotto A*B:"<br />

DO i=1,3<br />

WRITE(*,200) (AperB(i,j),j=1,3)<br />

END DO<br />

PRINT 100, "Vettore Prodotto A*c:"<br />

WRITE(*,200) (Aperc(i),i=1,3)<br />

PRINT 100, "Matrice Rapporto c/A:"<br />

WRITE(*,200) (cdivA(i),i=1,3)<br />

dim=13<br />

PRINT 100, "Inversa di A:"<br />

DO i=1,3<br />

WRITE(*,200) (Inv_A(i,j),j=1,3)<br />

END DO<br />

100 FORMAT(/,1X,A,/1X,("="))<br />

200 FORMAT(3(1X,F7.4))<br />

END PROGRAM prova_operatori<br />

Compilato con l’Intel <strong>Fortran</strong> Compiler (Ver. 4.5) e mandato in esecuzione su un PC con<br />

processore Intel Pentium III, il programma precedente fornisce il seguente output:<br />

Matrice A:<br />

==========<br />

6.5269 0.6481 1.3421<br />

1.2688 6.3646 1.30<strong>90</strong><br />

0.5735 1.3217 6.0345<br />

Matrice B:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!