Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int ans = 0;
- char choice,e;
- int month, day;
- do{
- cout<<"******************ZODIAC SIGN GENERATOR******************"<<endl;
- cout <<"Enter the Birthmonth number : ";
- cin >> month;
- cout <<"\n" <<"Enter Day of Birth: ";
- cin >> day;
- if ((month == 1 && day >= 20 && day < 32 ) || (month == 2 && day <= 18 && day > 0 ))
- {
- if(month==1)
- cout<<"\n" <<"The Zodiac Sign for January "<<day << " is Aquarius.";
- else if
- (month==2)
- cout<<"\n" <<"The Zodiac Sign for February "<<day << " is Aquarius.";
- }
- else if ((month == 3 && day >= 21 && day < 32 ) || (month == 4 && day <= 19 && day > 0 ))
- {
- if(month==3)
- cout<<"\n" <<"The Zodiac Sign for March "<<day << " is Aries.";
- else if
- (month==4)
- cout<<"\n" <<"The Zodiac Sign for April "<<day << " is Aries.";
- }
- else if ((month == 4 && day >= 20 && day < 31 ) || (month == 5 && day <= 20 && day > 0 ))
- {
- if(month==4)
- cout<<"\n" <<"The Zodiac Sign for April "<<day << " is Taurus.";
- else if
- (month==5)
- cout<<"\n" <<"The Zodiac Sign for May "<<day << " is Taurus.";
- }
- else if ((month == 5 && day >= 21 && day < 32 ) || (month == 6 && day <= 20 && day > 0 ))
- {
- if(month==5)
- cout<<"\n" <<"The Zodiac Sign for May "<<day << " is Gemini.";
- else if
- (month==6)
- cout<<"\n" <<"The Zodiac Sign for June "<<day << " is Gemini.";
- }
- else if ((month == 2 && day >= 19 && day < 30 ) || (month == 3 && day <= 18 && day > 0 ))
- {
- if(month==2)
- cout<<"\n" <<"The Zodiac Sign for February "<<day << " is Pisces.";
- else if
- (month==3)
- cout<<"\n" <<"The Zodiac Sign for March "<<day << " is Pisces.";
- }
- else if ((month == 6 && day >= 21 && day < 31 ) || (month == 7 && day <= 22 && day > 0 ))
- {
- if(month==6)
- cout<<"\n" <<"The Zodiac Sign for June "<<day << " is Cancer.";
- else if
- (month==7)
- cout<<"\n" <<"The Zodiac Sign for July "<<day << " is Cancer.";
- }
- else if ((month == 7 && day >= 23 && day < 32) || (month == 8 && day <= 22 && day > 0 ))
- {
- if(month==7)
- cout<<"\n" <<"The Zodiac Sign for July "<<day << " is Leo.";
- else if
- (month==8)
- cout<<"\n" <<"The Zodiac Sign for August "<<day << " is Leo.";
- }
- else if ((month == 8 && day >= 23 && day < 32) || (month == 9 && day <= 22 && day > 0 ))
- {
- if(month==8)
- cout<<"\n" <<"The Zodiac Sign for August"<<day << " is Virgo.";
- else if
- (month==9)
- cout<<"\n" <<"The Zodiac Sign for September "<<day << " is Virgo.";
- }
- else if ((month == 9 && day >= 23 && day < 31 ) || (month == 10 && day <= 22 && day > 0 ))
- {
- if(month==9)
- cout<<"\n" <<"The Zodiac Sign for September "<<day << " is Libra.";
- else if
- (month==10)
- cout<<"\n" <<"The Zodiac Sign for October "<<day << " is Libra.";
- }
- else if ((month == 10 && day >= 23 && day < 32 ) || (month == 11 && day <= 21 && day > 0 ))
- {
- if(month==10)
- cout<<"\n" <<"The Zodiac Sign for October "<<day << " is Scorpio.";
- else if
- (month==11)
- cout<<"\n" <<"The Zodiac Sign for November "<<day << " is Scorpio.";
- }
- else if ((month == 11 && day >= 22 && day < 31 ) || (month == 12 && day <= 21 && day > 0 ))
- {
- if(month==11)
- cout<<"\n" <<"The Zodiac Sign for November "<<day << " is Sagittarius.";
- else if
- (month==12)
- cout<<"\n" <<"The Zodiac Sign for December "<<day << " is Sagittarius.";
- }
- else if ((month == 12 && day >= 22 && day < 32) || (month == 1 && day <= 19 && day > 0 ))
- {
- if(month==12)
- cout<<"\n" <<"The Zodiac Sign for December "<<day << " is Capricorn.";
- else if
- (month==1)
- cout<<"\n" <<"The Zodiac Sign for January "<<day << " is Capricorn.";
- }
- else
- cout <<"\n" << "\n" << "INVALID INPUT \n";
- cout<<"\nDo you want to enter again ?: Y or N ";
- cin>>choice;
- while (toupper(choice) == 'Y'){
- system("cls");
- return main(); }
- char choys = ' ';
- cout<<"Do you want to Exit?: ";
- cin>>choice;
- }while(toupper(choice) != 'Y');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement