主题:程序运行问题
subroutine function_p
real p,b,a
a=0.002
p=3*a*sin(b)*(2+a*cos(b))/(2+a**2)*(1+a*cos(b))**2
end subroutine function_p
program main
call funtion_p
real b,p,s,i
do 10 i=0,100,1
b=(2*pi*i)/100
s=p
10 write(*,100) 'b=',b,'s=',s
100 format(1x,a,f9.2,a,f9.2)
end
--------------------Configuration: Text2 - Win32 Debug--------------------
Compiling Fortran...
F:\Text2.f90
F:\Text2.f90(8) : Error: A specification statement cannot appear in the executable section.
real b,p,s,i
--------^
Error executing df.exe.
Text2.exe - 1 error(s), 0 warnings
哪位帮忙改正一下错误?
real p,b,a
a=0.002
p=3*a*sin(b)*(2+a*cos(b))/(2+a**2)*(1+a*cos(b))**2
end subroutine function_p
program main
call funtion_p
real b,p,s,i
do 10 i=0,100,1
b=(2*pi*i)/100
s=p
10 write(*,100) 'b=',b,'s=',s
100 format(1x,a,f9.2,a,f9.2)
end
--------------------Configuration: Text2 - Win32 Debug--------------------
Compiling Fortran...
F:\Text2.f90
F:\Text2.f90(8) : Error: A specification statement cannot appear in the executable section.
real b,p,s,i
--------^
Error executing df.exe.
Text2.exe - 1 error(s), 0 warnings
哪位帮忙改正一下错误?