|
program ex0805
implicit none
!open(unit=10,file="abc.txt")
integer,parameter::players=5
real::angle(players)=(/30.0,45.0,35.0,50.0,40.0/)
real::speed(players)=(/25.0,20.0,21.0,27.0,22.0/)
real::distance(players)
!open(unit=10,file="distance.txt")
integer::I
do I=1,players
call Get_Distance(angle(i),speed(i),distance(i))
open(unit=10,file="distance.txt")
write(10,"('player',I1,'=',F8.2)")I,distance(i)
end do
stop
end
为什么open语句只有放在橘黄色行能运行,在绿色和紫色行不能运行?
|
|