program ex
implicit none
integer,parameter :: students=5
integer :: x,y,a(students)=(/5,7,1,0,-4/)
x=maxval(a(students))
y=minval(a(students))
write(*,*) x,y
stop
end
QQ截图20210310144942.png (18.42 KB, 下载次数: 319)
错误如图
vvt 发表于 2021-3-10 16:41
x=maxval(a)
y=minval(a)
就行了。
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |