- #1
ineedhelpnow
- 651
- 0
hey hey :)
View attachment 4843
So this is the code i came up with
Needless to say, I have absolutely no idea what I'm doing so I'd really appreciate help :)
View attachment 4843
So this is the code i came up with
Code:
%% part 2
x=[1 2 3 4 5];
% 1 is freshman
% 2 is softmore
% 3 is junior
% 4 is senior
% >4 is super senior
for i=1:5
s=input('number: ');
switch s
case 1
yearNumber='freshman';
case 2
yearNumber='softmore';
case 3
yearNumber='junior';
case 4
yearNumber='senior';
otherwise
yearNumber='super senior';
end
disp(yearNumber)
end
Needless to say, I have absolutely no idea what I'm doing so I'd really appreciate help :)