% ifElseExample2.m    P. Conrad for CISC106, 09/25/2006
% illustrate how to use an if/elseif/else

% Ask user to input a grade, 
% Then, print whether the grade is a passing or failing grade.
% Treat "Perfect Score" and "Zero" as special cases.

grade = input('Enter a grade: ');

if (grade == 100)
     display('Perfect Score');
elseif (grade >= 60)
     display('Passed');
elseif (grade ~= 0)
     display('Failed');
else
     display('Zero');
end
