fortran求找错program dsdimplicit nonereal(8) ::a(2,2)data a/1,3,2,4/call brinv(a,2)print*,aend program dsdsubroutine brinv(a,n)dimension a(n,n),is(n),js(n)double precision a,t,dl=1do 100 k=1,nd=0.0do 10 i=k,ndo 10 j=k,nif(abs(a(i,j)).gt.d) thend=a

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/27 13:12:09
fortran求找错program dsdimplicit nonereal(8) ::a(2,2)data a/1,3,2,4/call brinv(a,2)print*,aend program dsdsubroutine brinv(a,n)dimension a(n,n),is(n),js(n)double precision a,t,dl=1do 100 k=1,nd=0.0do 10 i=k,ndo 10 j=k,nif(abs(a(i,j)).gt.d) thend=a
xTr0~jձd:q^Pbv`+0f(!%$/I;{wO+ջ7+pl)5!+(l*r yhP[2 $İ r$>H!̇8T׉kz6[X@ -4,\Ӏ2uMMtb `訪vL5Kez3(oσc #E5x tI8)(c[e%H*_b%)t"/ %GLpE*j~N4ns|z a=14]k'{`2VJa^@ )`rRj\*52&hꚔ9s/Pv3G& 7+`T6,ξ̝h\5S+ Fa.9x4{J:UwE%I]AA8H7duK4kn]+סXȨW@8ϋalT剉*Gzlz54M~E'|T$ޝOo.X~VI4W ̦h8L}HO EӳYjz9"҈7,G

fortran求找错program dsdimplicit nonereal(8) ::a(2,2)data a/1,3,2,4/call brinv(a,2)print*,aend program dsdsubroutine brinv(a,n)dimension a(n,n),is(n),js(n)double precision a,t,dl=1do 100 k=1,nd=0.0do 10 i=k,ndo 10 j=k,nif(abs(a(i,j)).gt.d) thend=a
fortran求找错
program dsd
implicit none
real(8) ::a(2,2)
data a/1,3,2,4/
call brinv(a,2)
print*,a
end program dsd
subroutine brinv(a,n)
dimension a(n,n),is(n),js(n)
double precision a,t,d
l=1
do 100 k=1,n
d=0.0
do 10 i=k,n
do 10 j=k,n
if(abs(a(i,j)).gt.d) then
d=abs(a(i,j))
is(k)=i
is(K)=j
end if
10 continue
if(d+1.0.eq.1.0) then
l=0
write(*,20)
return
end if
20 format(1x,'err**not inv')
do 30 j=1,n
t=a(k,j)
a(k,j)=a(is(k),j)
a(is(k),j)=t
30 continue
do 40 i=1,n
t=a(i,k)
a(i,k)=a(i,js(k))
a(i,js(k))=t
40 continue
a(k,k)=1/a(k,k)
do 50 j=1,n
if(j.ne.k)then
a(k,j)=a(k,j)*a(k,k)
end if
50 continue
do 70 i=1,n
if(i.ne.k)then
do 60 j=1,n
if(j.ne.k)then
a(i,j)=a(i,j)-a(i,k)*a(k,j)
end if
60 continue
end if
70 continue
do 80 i=1,n
if(i.ne.k)then
a(i,k)=-a(i,k)*a(k,k)
end if
80 continue
100 continue
do 130 k=n,1,-1
do 110 j=1,n
t=a(k,j)
a(k,j)=a(js(k),j)
a(js(k),j)=t
110 continue
do 120 i=1,n
t=a(i,k)
a(i,k)=a(i,is(k))
a(i,is(k))=t
120 continue
130 continue
return
end

fortran求找错program dsdimplicit nonereal(8) ::a(2,2)data a/1,3,2,4/call brinv(a,2)print*,aend program dsdsubroutine brinv(a,n)dimension a(n,n),is(n),js(n)double precision a,t,dl=1do 100 k=1,nd=0.0do 10 i=k,ndo 10 j=k,nif(abs(a(i,j)).gt.d) thend=a
不知道你这程序是干什么的
但感觉你里边的一个 is(K)=j 应该改成 js(K)=j
改了后可以运行

fortran求找错program dsdimplicit nonereal(8) ::a(2,2)data a/1,3,2,4/call brinv(a,2)print*,aend program dsdsubroutine brinv(a,n)dimension a(n,n),is(n),js(n)double precision a,t,dl=1do 100 k=1,nd=0.0do 10 i=k,ndo 10 j=k,nif(abs(a(i,j)).gt.d) thend=a fortran语言问题求大神解答.大学95版.Program testImplicit noneInteger::sum,isum=0.0do i=1,203,2sum=sum+iend dowrite(*,*)iend fortran fortran 找错program eepreal::u1,u0,n,Ei(5),sum,x(5)integer::max=20parameter(eps=1e-10,y=0.577215665)write(*,100) '请输入x的值' !x=0.5000,0.5234,0.7635,1.2536,2.5000,2.7865,3.3500read*,x100 format(2x,f7.4)u0=-x;n=1;sum=u0do while(u1-u0>eps)u1 求相关系数fortran程序~求相关系数的fortran程序~. fortran程序求矩阵特征值, 求找错别字并改正 单词找错并修改,求 求问fortran里面 WRITE(*,'(A,$)')这句话是什么意思?PROGRAM CALL_FACTORlAL 调用FACTORIAL函数的主程序INTERFACEINTEGER ::N,F_RESRECURSIVE FUNCTION FACTORIAL(N) RESULT(F_RES) END FUNCTION FACTORIALEND INTERFACEINTEGER ::NWRITE(*,'(A,$)' fortran问题,求大神解答这是怎么回事 求3Ds Max8急用! fortran ran函数如下语句program ranimplicit noneinteger i do i=1,1000print*,i,ran()enddoend program编译通不过去 是什么原因 我用的fortran 90 想用随机函数 fortran的一个问题 求大神解答本题是求从文件中导入数之和 文件中的数是从1到100程序如下:program sumimplicit noneinteger tem(100),sum,isum=0open(10,file='sum.dat',status='old')do i=1,100read(10,*) tem(i)enddodo i=1,10 w ds ds ds fortran语言 循环问题program eee integer a a=1 do 11 a=1,10 if (a.GE.5) go to 11 write(*,*)a11 continue write(*,*)a stopend请问为什么出来的结果是1,2,3,4,11呢?求大神解答,无限感谢~~ 求fortran语言改正!将10个数的数组A中最大的元素与A(10)互换program mainimplicit nonereal,dimension(10)::areal term,maxinteger iread*,amax=a(1)DO I=2,10IF(a(i)>=max)thenmax=a(i)term=maxmax=a(10)a(10)=termend ifend doprint*,aend有什 fortran编程,求大虾,PROGRAM TESTIMPLICIT NONEINTEGER ::I,J,k,m,n,ierrREAL ::X,Y,Space,Angle,RREAL(8),PARAMETER::PI=3.141592654PRINT *,'请输入I,J,Space的值:'READ(*,*) I,J,SpacePRINT *,'请输入角度(单位度):'READ (*,*) AngleAngle=3 急,高手帮我看看这个fortran求积分的程序哪错了,为什么运行不出来结果.program f915implicit noneexternal f1,f2,f3double precision a,b,simpswrite(*,*)'a,b'read(*,*)a,bwrite(*,*)simps(a,b,1d-7,f1)write(*,*)simps(a,b,1d-7,f2)write