Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- signsName = {'Capricorn','Aquarius','Pisces','Aries','Taurus','Gemini','Cancer','Leo','Virgo','Libra','Scorpio','Sagittarius'};
- signsDate = [20;19;21;20;21;21;23;23;23;23;22;22];
- 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)));
- if day < signsDate(month, 1)
- fprintf('Your sign is %s\n', signsName{month});
- else
- fprintf('Your sign is %s\n', signsName{month+1});
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement