cout problem on chinese zodiac program - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

cout problem on chinese zodiac program

DoctorGDoctorG Posts: 2Member
Hello. I'm making a Chinese zodiac program for fun, but regardless of what year I input I always get back "You were born in the year of the Dragon."
Thanks

#include


main()
{
int year; // four digit year
cout << "Enter your four digit birth year: ";
cin >> year;
if (year == 1976^1964)
{cout << "You were born in the year of the Dragon
";}

else if (year == 1981)
{cout << "Your were born in the year of the Rooster
";}

else if (year == 1982)
{cout << "Your were born in the year of the Dog
";}

return(0);
}

Comments

Sign In or Register to comment.