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

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.