Skip to content

@brntbeer /Omar_Prieto_Problem1.m secret
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
% Problem 2
prompt = 'Would you like to check your grade? (Enter yes or no)';
str = input(prompt, 's')';
if isempty(str);
str = 'yes';
end;
prompt = 'please enter your score';
result = input(prompt);
s = result;
if s >= 89.5 && s <= 100;
disp('Your overall scrore is an A');
elseif s >= 79.5 && s <= 89.5;
disp('Your overall scrore is a B');
elseif s >= 69.5 && s <= 79.5;
disp('Your overall scrore is a C');
elseif s >= 59.5 && s <= 69.5;
disp('Your overall scrore is a D');
elseif s >= 0 && s <= 59.5;
disp('Your overall scrore is an F');
else s > 100 && s < 0;
disp('Invalid grade entered');
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.