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

C Programming

image text in transcribed

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: 924 1925 926 1927 1928 1929 1930 931 1932 1933 1934 1935 1936 1937 1938 939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1960 1961 1962 963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 989 1990 1991 1992 1993 19942008 1995 1996 1997 1998 1999 008 009 010 er 013 015 1956 1957 1958 1959 2004 2016 018 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