FORTRAN问题,二处错误ROGRAM MAIN\x05PROGRAM EX2 \x05PRINT *,'R=',1.0,'C=',C(1,0)\x05PRINT *,'R=',3.0,'C=',C(3,0)\x05PRINT *,'R=',4.0,'C=',C(4,0)\x05PRINT *,'R=',12.0,'C=',C(12,0)\x05ENDPROGRAM 1\x05FUNCTION C(R)\x05PI=3.1415926\x05C=2*PI*R\x05RE

来源:学生作业帮助网 编辑:作业帮 时间:2024/12/03 09:46:00
FORTRAN问题,二处错误ROGRAM MAIN\x05PROGRAM EX2 \x05PRINT *,'R=',1.0,'C=',C(1,0)\x05PRINT *,'R=',3.0,'C=',C(3,0)\x05PRINT *,'R=',4.0,'C=',C(4,0)\x05PRINT *,'R=',12.0,'C=',C(12,0)\x05ENDPROGRAM 1\x05FUNCTION C(R)\x05PI=3.1415926\x05C=2*PI*R\x05RE
xkPǟ7 &tĚ"Z؃0\caZf(ЎuP֧mt?ڷeg4M/Ƭ|/~VE ۫ɧw?< .&ר-%Y*۳X|AK%B-f M YT.ռzmQY.1)DycƝ]YP BE-VakzB+mK%|dqi9`gA$i2HE.+e2Bhz1ŕE89'"yiFCtP;V9 b:J[hۦPS@t 0OAýiC_#CjaI] kv=C)BWQxb)x1E1c Ȁ,[W?xNUp}tdo/ng㏧W://EM"gD pWbef(HWƚ+ݖ͖جi{ MK?

FORTRAN问题,二处错误ROGRAM MAIN\x05PROGRAM EX2 \x05PRINT *,'R=',1.0,'C=',C(1,0)\x05PRINT *,'R=',3.0,'C=',C(3,0)\x05PRINT *,'R=',4.0,'C=',C(4,0)\x05PRINT *,'R=',12.0,'C=',C(12,0)\x05ENDPROGRAM 1\x05FUNCTION C(R)\x05PI=3.1415926\x05C=2*PI*R\x05RE
FORTRAN问题,二处错误
ROGRAM MAIN
\x05PROGRAM EX2
\x05PRINT *,'R=',1.0,'C=',C(1,0)
\x05PRINT *,'R=',3.0,'C=',C(3,0)
\x05PRINT *,'R=',4.0,'C=',C(4,0)
\x05PRINT *,'R=',12.0,'C=',C(12,0)
\x05END
PROGRAM 1
\x05FUNCTION C(R)
\x05PI=3.1415926
\x05C=2*PI*R
\x05RETURN
\x05END
D:\xuexi\Fortran\2\EX2.F90(2) :Error:This statement is positioned incorrectly and/or has syntax errors.
PROGRAM EX2
D:\xuexi\Fortran\2\EX2.F90(9) :Error:Syntax error,found INTEGER_CONSTANT '1' when expecting one of:
PROGRAM 1

FORTRAN问题,二处错误ROGRAM MAIN\x05PROGRAM EX2 \x05PRINT *,'R=',1.0,'C=',C(1,0)\x05PRINT *,'R=',3.0,'C=',C(3,0)\x05PRINT *,'R=',4.0,'C=',C(4,0)\x05PRINT *,'R=',12.0,'C=',C(12,0)\x05ENDPROGRAM 1\x05FUNCTION C(R)\x05PI=3.1415926\x05C=2*PI*R\x05RE
楼主,帮你改了一下,复制我改的程序运行吧,程序如下:
PROGRAM EX2
REAL R,C
PRINT *,'R=',1.0,'C=',C(1.0)
PRINT *,'R=',3.0,'C=',C(3.0)
PRINT *,'R=',4.0,'C=',C(4.0)
PRINT *,'R=',12.0,'C=',C(12.0)
END
FUNCTION C(R)
REAL R,C
PI=3.1415926
C=2*PI*R
RETURN
END