% This program transform a grade average 
% into a letter grade

% Example of multiple branching

clear;
N=input(' Grade=')

if N>=90 
   fprintf('Grade obtained= %3.0f',N);
   disp('Letter Grade A');
elseif N>=85 & N<90, ...
   fprintf('Grade obtained= %3.0f\n',N);
   disp('Letter Grade A-');
elseif N>=80 & N<85, ...
   fprintf('Grade obtained= %3.0f\n',N);
   disp('Letter Grade B+');
elseif N>=76 & N<80, ...
   fprintf('Grade obtained= %3.0f\n',N);
   disp('Letter Grade B');
elseif N>=72 & N<76, ...
   fprintf('Grade obtained= %3.0f\n',N);
   disp('Letter Grade B-');
elseif N>=69 & N<72, ...
   fprintf('Grade obtained= %3.0f\n',N);
   disp('Letter Grade C+');
elseif N>=65 & N<69, ...
   fprintf('Grade obtained= %3.0f\n',N);
   disp('Letter Grade C');
elseif N>=60 & N<65, ...
   fprintf('Grade obtained= %3.0f\n',N);
   disp('Letter Grade C-');
elseif N>=55 & N<60, ...
   fprintf('Grade obtained= %3.0f\n',N);
   disp('Letter Grade D+');
elseif N>=50 & N<55, ...
   fprintf('Grade obtained= %3.0f\n',N);
   disp('Letter Grade D');
else 
   fprintf('Grade obtained= %3.0f\n',N);
   disp('Letter Grade E');


end

%  Other relational operators are 
% equal: 				==
% not equal: 			~=
% less than or equal	<=

% Other logical operators are
% or:  |
% not: ~

% Assignment: Create a code using all the above 
% relational and logical operators not used in the letter grade code.

   
