Question: Stuck in a bind again and cant figure the code out for this. Please help. .11 T-Mobile 9:09 AM @* 95% Lab Assignment 3 S17-Chinese
.11 T-Mobile 9:09 AM @* 95% Lab Assignment 3 S17-Chinese Zoc ] Open with Print CSCI 251 Problem Statement The Chinese Zodiac is based on a tweve-year cycle, with each year represented by an animal: monkey rooster, pg rat, ar tiger, tatbitdeagon, snake, horse, or sheep By taking the modulus of the year, you can debermine which animal corresponds to that year animal-year mod 12 0: monkey 2 dog & pig T: rabbin 9 snake 11: shc For example, the year 1900 is the year of the Rat since (1900 mod 12) 4 The Chinese New Year, however, is based on alunar cycle and is not the same day each year. Typically the new year sometime in February. So, using the above example, i the date was January 1900, the year would be the Pig M the date, however, was February through December, it would be the year of the Rat Write a program tht prompts for the month and year. Using a switch statement, output the Chinese codiac animal (Assume January is the previous year's animal. Allother months are that years animal). Input Data "year Output Data . The Chinese zodiac animal Before You Begin 1 Start MATLAB (Start> All Programs MATLAB R2013a) and change your Cwrent Folder to the location of your hard drive (e g.K/MATLAB programs/) If you forget to do this, your MATLAB programs will not be accessible whenever the computers in this lab are cleared, which throughout the semester 2. In the Command Window, type edit ChineseZodiac.m MATLAB should prompt that the file does not cumently exist select OK so MATLAB will create the ile in your Curment Folder Starting File Include header comments ie at the beginning of your fle) formatted as show below. Your electronic submisson of program file w represent your endorsement ofthe Honor Code Statement. % csci 251, Sector, x %lntoep ng with the Honor Code of he School of Engreenrg. I have nether %given nor assistance from he instructo
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
