program calcul_prod_mat
double precision a(10,10)
double precision b(10,10)
double precision c(10,10)

integer i,j,l,k
real s
s =0
write(*,*)'l='
read(*,*)l
write(*,*)'mat a'
do i=1,l
c   do j=1,l
  read(*,*) (a(i,j),j=1,l)
c   enddo
enddo
write(*,*)'mat b'

do i=1,l
c   do j=1,l
  read(*,*)( b(i,j),j=1,l)
c       enddo
    enddo
   

do i=1,l
do j=1,l
do k=1,l
s=s+a(i,k)*b(k,j)
enddo

c(i,j)=s
s=0
enddo

enddo


write(*,*)'c(i,j)='
    do i=1,l

c    write(*,*) 'a(i,j)=',i,j,a(i,j)
   
write(*,*)(c(i,j),'**',j=1,l)
 
 enddo
   end

Enregistrer un commentaire

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

 
Top

Powered by themekiller.com