hi,
could someone help me fix the code for the following question:
I need to create a program that determines the animal corresponding to an input year of birth.
Assume that the input year is 1900 or later.
The 12-year
animal cycle is rat, ox, tiger, rabbit, dragon, snake, horse, ram (or goat), monkey, rooster,
dog, and boar
#include <iostream>// requires for keyboard and screen I/O
#include <conio.h>
using namespace std;
void main ()
{
int birthYear = 0;
// used to determine the animal year
cout << " The 12-year animal cycle is rat, ox, tiger, rabbit, dragon, snake, horse, ram (or goat), monkey, rooster, dog, and boar." << endl;
cout << "Enter your year of birth and I will tell you your corresponding animal from the Chinese calendar " << endl;
cin >> birthYear;
while ((birthYear == 1900)|| (birthYear += 1900))
{cout << "The corresponding animal from the Chinese calendar is: Rat" << endl;
cin >> birthYear;}
while ((birthYear == 1901)|| (birthYear += 1901))
{cout << "The corresponding animal from the Chinese calendar is: Ox" << endl;
cin >> birthYear;}
while ((birthYear == 1902)|| (birthYear += 1902))
{cout << "The corresponding animal from the Chinese calendar is: Tiger" << endl;
cin >> birthYear;}
while ((birthYear == 1903)|| (birthYear += 1903))
{cout << "The corresponding animal from the Chinese calendar is: Rabbit" << endl;
cin >> birthYear;}
while ((birthYear == 1904)|| (birthYear += 1904))
{cout << "The corresponding animal from the Chinese calendar is: Dragon" << endl;
cin >> birthYear;}
while ((birthYear == 1905)|| (birthYear += 1905))
{cout << "The corresponding animal from the Chinese calendar is: Snake" << endl;
cin >> birthYear;}
while ((birthYear == 1906)|| (birthYear += 1906))
{cout << "The corresponding animal from the Chinese calendar is: Horse" << endl;
cin >> birthYear;}
while ((birthYear == 1907)|| (birthYear += 1907))
{cout << "The corresponding animal from the Chinese calendar is: Ram" << endl;
cin >> birthYear;}
while ((birthYear == 1908)|| (birthYear += 1908))
{cout << "The corresponding animal from the Chinese calendar is: Monkey" << endl;
cin >> birthYear;}
while ((birthYear == 1909)|| (birthYear += 1909))
{cout << "The corresponding animal from the Chinese calendar is: Roster" << endl;
cin >> birthYear;}
while ((birthYear == 1910)|| (birthYear += 1910))
{cout << "The corresponding animal from the Chinese calendar is: Dog" << endl;
cin >> birthYear;}
while ((birthYear == 1911)|| (birthYear += 1911))
{cout << "The corresponding animal from the Chinese calendar is: Boar" << endl;
cin >> birthYear;}
// output results to screen
cout << "The corresponding animal from the Chinese calendar is: " << endl;
getch(); // holding the screen
} // end main