fortran小学生,请教各位这个fortran程序哪里不对,求解一元二次方程
答案:1 悬赏:40 手机版
解决时间 2021-04-16 08:23
- 提问者网友:遮云壑
- 2021-04-15 12:47
c
d=abs(b*b-4*a*c)
e=sqrt(d)
f=(-0!提示我Expected a right parenthesis in expression f=(-0.5*e/b
else
print*; x=";a.5*d/.5*d/,-0.5*e/a)
if (a/=0) then
print*;a)
g=(-0, "one root is ";, g
elseif ((a==0) .and. (b/=0)) then
print*, ".5*b/,0,b;a)
program
implicit none
real .5*b/.5*b/, -c/, c,d,e
complex f;a:: a, b,0,c"
read*,a, b,g
print*, "please input a;a;a;the other root is ".5*b/, f
print*, ",0;a)
! Expected a right parenthesis in expression g=(-0
最佳答案
- 五星知识达人网友:逃夭
- 2021-04-15 14:25
不能是空的
implicit none
real ; 同上
if (a/=0) then
print*;the other root is ", -c/, "one root is ",c"
read*,a, b!// x=", c,d,e
complex fprogram t :: a, b;, g
elseif ((a==0) .and. (b/=0)) then
print*, ", c
d=abs(b*b-4*a*c)
e=sqrt(d)
f=cmplx(-0.5*b/a,0.5*e/a) !// 把两个数合成为复数!//a,用 cmplx
g=cmplx(-0; Program 后面必须有名称,例如 t,b,g
print*.5*b/, "please input a;b
else
print*,-0.5*e/a) , f
print*, "
implicit none
real ; 同上
if (a/=0) then
print*;the other root is ", -c/, "one root is ",c"
read*,a, b!// x=", c,d,e
complex fprogram t :: a, b;, g
elseif ((a==0) .and. (b/=0)) then
print*, ", c
d=abs(b*b-4*a*c)
e=sqrt(d)
f=cmplx(-0.5*b/a,0.5*e/a) !// 把两个数合成为复数!//a,用 cmplx
g=cmplx(-0; Program 后面必须有名称,例如 t,b,g
print*.5*b/, "please input a;b
else
print*,-0.5*e/a) , f
print*, "
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯