Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  逐步模拟
Language: FORTRAN
Code:
real(8),dimension(5:5)::a=0,b=0
integer i,j,k
read(*,*)((a(i,j),j=1,5),i=1,5)
k=4
do i=1,5
 do j=1,5
  if(j/=k.and.i==k) b(i,j)=a(k,j)/a(k,k)
  if(j/=k.and.i/=k) b(i,j)=a(i,j)-a(k,j)*a(i,k)/A(k,k)
  if(j==k.and.i==k) b(i,j)=1.0/a(k,k)
  if(j==k.and.i/=k) b(i,j)=-a(i,k)/a(k,k)
 end do
end do
do i=1,5
write(*,"(5f1.3)")(a(i,j),j=1,5)
end do
end
          
          
Comments: