Question: display grades operation.

im trying to input a number between 0-100 and have the operation return the grade a,b,c,d,f. etc though long i though this might work.

Grades:=proc(x)
local a,b,c,d,f;
a:=(100..89.5);
b:=(89.4..79.5);
c:=(79.4..69.5);
d:=(69.4..59.5);
f:=(59.4..0);
if x=(100..89.5) then
display(a);
else
if x=(89.4..79.5)then
display(b);
else
if x=(79.4..69.5) then
display(c);
else
if x=(69.4..59.5) then
display(d);
else
if x=(59.4..0) then
display(f)
end;
end;
end;
end;
end;
end;

Please Wait...