- 2
- 0
- 约1.38万字
- 约 45页
- 2017-06-02 发布于湖北
- 举报
例题6-2 PROGRAM ex06_02 IMPLICIT NONE EXTERNAL sub REAL:: r(5),total,ave call sub(r,total,ave) print *, This is Jiangyin station precipitation, total=, total, ave=, ave call sub(r,total,ave) print *, This is Dingbozha station precipitation, total=, total, ave=, ave call sub(r,total,ave) print *, This is Xiaoshan station precipitation, total=, total, ave=, ave end SUBROUTINE sub(r,total,ave) real r(5), total, ave read *, r total=0.0 Do i=1,5 total=total+r(i) end do ave=total/5.0 end 请将上述输出结果输入到一个有格式顺序文件中 PROGRAM ex06_02 IMPLICIT NONE EXTERNAL sub REAL:: r(5),total,ave open(1,file=d:/cvf/stprec.t
原创力文档

文档评论(0)