!输入十个人的学号和成绩,高于平均分的学号和成绩打印出来
[Fortran] 纯文本查看 复制代码 program yatou
implicit none
integer b(11)
integer i,o,p,q,r,s,t
o=0
p=0
q=0
r=0
s=0
do 10,i=1,10,1
read*,b(i)
10 continue
do 20,i=1,10,1
if(60>b(i)>0) then
o=o+1
endif
if(59<b(i)<70) then
p=p+1
endif
if(69<b(i)<80) then
q=q+1
endif
if(79<b(i)<90) then
r=r+1
endif
if(89<b(i)<100) then
s=s+1
endif
20 continue
print*,"不及格人数",o
print*,"60——69",p
print*,"70——79",q
print*,"80——89",r
print*,"90——100",s
end
不知道为什么,总是显示
|