dim pointStduent(50) as Integer
dim i as byte
dim MaxPoint as integer
dim MinPoint as integer
dim MidPoint as integer
dim Temp as integer
dim DataCheck as integer
for i = 0 to 48
if pointStduent(i) > pointStduent(i+1) then
MaxPoint = pointStduent(i)
end if
if pointStduent(i) < pointStduent(i+1) then
MinPoint = pointStduent(i)
end if
next i
Temp = MaxPoint - MinPoint
MidPoint = Temp / 2
DataCheck = Temp / 8
for i = 0 to 49
if pointStduent(i) > MidPoint + (DataCheck * 4) then
Print "Stduent " & i & " = "A"
Exit sub
elseif pointStduent(i) > MidPoint + (DataCheck * 3) then
Print "Stduent " & i & " = "B+"
Exit sub
elseif pointStduent(i) > MidPoint + (DataCheck * 2) then
Print "Stduent " & i & " = "B"
Exit sub
elseif pointStduent(i) > MidPoint + (DataCheck * 1) then
Print "Stduent " & i & " = "c+"
Exit sub
elseif pointStduent(i) > MidPoint + (DataCheck * 0) then
Print "Stduent " & i & " = "c"
Exit sub
elseif pointStduent(i) < MidPoint + (DataCheck * -3) then
Print "Stduent " & i & " = "F"
Exit sub
elseif pointStduent(i) < MidPoint + (DataCheck * -2) then
Print "Stduent " & i & " = "D"
Exit sub
elseif pointStduent(i) < MidPoint + (DataCheck * -1) then
Print "Stduent " & i & " = "D+"
Exit sub
end if