Question
This is the problem, and this below is my code. how can I make this be a constant loop so it can keep asking for
This is the problem, and this below is my code. how can I make this be a constant loop so it can keep asking for a new user year input?
Program:
#include
Output:
gcc version 4.6.3 Enter year: 2019 Pig
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 program Test Case: 1924 1948 1960 1961 1962 1963 1972 1973 1974 1975 1976 1977 1978 1979 1984 985 1986 1987 1988 O2% 1925 1937 1949 1997 1998 1999 2000 009 10 1927 1928 1929 1930 1931 1932 1933 1934 1935 1939 1940 1952 2012 1953 Hors 942 2002 014 Shesep 1955 1956 1957 1958 1959 1967 1991 1992 1993 1994 1943 2004 2005 2006 2007 Rooster 1945 1946 947 1969 1970 971 017 Dog 1982 18Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started