Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- birthday = input('Insert your birthday date in format dd-mm: ', 's')
- dm = strsplit(birthday, '-')
- day = str2num(cell2mat(dm(1,1)))
- month = str2num(cell2mat(dm(1,2)))
- switch month
- case 1
- if day > 19
- fprintf('Aquarius')
- else
- fprintf('Capricorn')
- end
- case 2
- if day > 18
- fprintf('Capricorn')
- else
- fprintf('Pisces')
- end
- case 3
- if day > 20
- fprintf('Pisces')
- else
- fprintf('Aries')
- end
- % Well, i'm too busy to do all of them ... Then i will do with a better way. This is the first time i tried
- otherwise
- fprintf('Not a god month');
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement