英俊男孩建坤 发表于 2020-10-5 23:02:13

大佬帮我看看

reset countA to countF value to zero
for each student s in class list L do
g = score of student s
if g >= 85 then countA = countA+1
if g >= 70 then countB = countB + 1
if g >= 55 then countC = countC+1
if g >= 40 then countD = countD +1
if g <40 then countF = countF +1


这个伪代码哪里有问题?

kogawananari 发表于 2020-10-5 23:19:20

if g >= 85 then A++
continue next loop
end if
if g >= 70 then B++
continue next loop
end if
...
页: [1]
查看完整版本: 大佬帮我看看