% grade1.m
%
%  Determine the letter grade for a given test score.
%
score = input ( '  Enter test score: ' );
%
%  Version 1:
%
if ( 90 <= score && score <= 100 )
  grade = 'A'
end

if ( 80 <= score && score < 90 )
  grade = 'B'
end

if ( 70 <= score && score < 80 )
  grade = 'C'
end

if ( 60 <= score && score < 70 )
  grade = 'D'
end

if ( 0 <= score && score < 60 )
  grade = 'F'
end

if ( score < 0 || 100 < score )
  disp ( '  This score is out of range!' )
end

