troubleshooting Question

java program for chinese horoscope...

Avatar of tribalzoid
tribalzoid asked on
3 Comments1 Solution2668 ViewsLast Modified:
The platform used is linux system...The program will reads in user input on birth year and prints out the corresponding
Chinese horoscope sign. The program allows a user to enquire about horoscope signs until a
sentinel value of ? is used to terminate the process. There are 12 signs in the Chinese
horoscope. The calculation of a horoscope sign is based on birth year. The 12 Chinese horoscope
signs and some of their corresponding years are given below:
Horoscope Sign Birth Year
Rat 1972, 1984, 1996?
Cow 1973, 1985, 1997?
Tiger 1974, 1986, 1998?
Rabbit 1975, 1987, 1999?
Dragon 1976, 1988, 2000?
Snake 1977, 1989, 2001?
Horse 1978, 1990, 2002?
Goat 1979, 1991, 2003?
Monkey 1980, 1992, 2004?
Rooster 1981, 1993, 2005?
Dog 1982, 1994, 2006?
Pig 1983, 1995, 2007?

I want the output to be as follow...
Enter your birth year: 2006
Your horoscope sign: Dog
Enter your birth year: ?
<Program terminates>

The year of the input does not only applies to the date shown above only... for example if the input for birth year is 1876, it shld display rat horoscope ...
Any body got any idea how to do it...

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros