% grade2.m
%
%  Determine the letter grade for a given test score.
%
score = input ( '  Enter test score: ' );

if ( 90 <= score && score <= 100 )
  grade = 'A'
elseif ( 80 <= score && score < 90 )
  grade = 'B'
elseif ( 70 <= score && score < 80 )
  grade = 'C'
elseif ( 60 <= score && score < 70 )
  grade = 'D'
elseif ( 0 <= score && score < 60 )
  grade = 'F'
else
  disp ( '  This score is out of range!' )
end

