Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C Programming Chinese Zodiac (The 12 Animal Signs) In the Chinese calendar, every year is associated with a particular animal. The 12-year animal cycle is

image text in transcribed

C Programming

Chinese Zodiac (The 12 Animal Signs) In the Chinese calendar, every year is associated with a particular animal. The 12-year animal cycle is rat, ox, tiger, rabbit, dragon, snake, horse, goat, monkey, rooster, dog, and boar. The year 1912 is a year of rat, thus 1913 is a year of the ox and 1924 is another year of the rat. If you know in what year a person was born, you can compute the offset from 1912 and determine the animal associated with that person's year of birth Step1: Create a program that determines the animal corresponding to an input year of birth. Assume that the input year is 1912 or later. Input: Year of birth Output: Corresponding animal from the Chinese calendar. Step2: Test your program using the following test plan. Include repletion structure to your program! Test Case: 1948 984 D06 009 010 1e72 925 1937 1981 1997 1974 1975 1976 1977 978 1938 Sabad2 1030 195106958700 1927 1963 1987 1990 1964 940 1941 1942 1943 1944 945 1948 Dragon 928 1953 1989 1990 014 1955 955 1957 968 967 1968 1999 1970 1931 sheep 1992 4 1932 981 1982 983 Rooster 1934 1995 1959 Extra credit #2 : Enhanced One Test your program using the following test case: 1604 Dragon, 1704 Monkey, 1887 Pig, 1754 Dog, 1621 Rooster

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

What is topology? Explain with examples

Answered: 1 week ago

Question

KEY QUESTION Refer to Figure 3.6, page

Answered: 1 week ago