代码大全

(singke) #1

RangeLimit(1) = 5 0.0
Grade(1) = 'F'
RangeLimit(2) = 65.0
Grade(2) = 'D'
RangeLimit(3) = 77.5
Grade(3) = 'C'
RangeLimit(4)= 90.0
Grade(4)= 'B'
RangeLimit(5)= 100.0
Grade(5) = 'A'
MaxGradeLevel = 5
...
'assign a grad to a student based on the student's score
GradeLevel= 1
StudentGrade = ”A"
while( StudentGrade = "A" and GradeLevel < MaxGradeLevel )
if( StudentScore < RangeLimit( GradeLevel ) ) then
StudentGrade = Grade ( GradeLevel)
end if
GradeLevel = GradeLevel + 1
end
( ,
)


0 5 0 5

0.458747 $0.00

0.547651 $254.32

0.627764 $514.77

0.778883 $747.82

0.893211 $l,042.65
0.957665 $5,887.55
0.976544 $12,836.98
0.987889 $27,234.12

Free download pdf