#include using namespace std; void main() { char choice; int month, bday; do { cout << "Would you like to run a program that will give your horoscope?\n" << "Enter y for yes, n for no, then press Enter key. "; cin >> choice; if (choice == 'y' || choice == 'Y') { cout << "Enter your month & birthday as integers, separated by a space.\n"; cin >> month; cin >> bday; // Begin multiway if-else branch statements if (((month == 3) && (bday >=21)) || ((month == 4) && (bday <= 19))) { cout << "Your sign is Aries. You will live long.\n"; if ((bday == 21) || (bday == 22)) cout << "You are on the cusp of being a Pisces. Your harvest will be bountiful.\n"; if ((bday == 18) || (bday == 19)) cout << "You are on the cusp of being a Taurus. You will be happy.\n\n"; } else if (((month == 4) && (bday >= 20)) || ((month == 5) && (bday <= 20))) { cout << "Your sign is Taurus. You will be happy.\n"; if ((bday == 20) || (bday == 21)) cout << "You are on the cusp of being a Aries. You will live long.\n"; if ((bday == 19) || (bday == 20)) cout << "You are on the cusp of being a Gemini. You will be proud.\n"; } else if (((month == 5) && (bday >= 21)) || ((month == 6) && (bday <= 21))) { cout << "Your sign is Gemini. You will be proud.\n"; if ((bday == 21) || (bday == 22)) cout << "You are on the cusp of being a Taurus. You will be happy.\n"; if ((bday == 20) || (bday == 21)) cout << "You are on the cusp of being a Cancer. You will meet someone special.\n"; } else if (((month == 6) && (bday >= 22)) || ((month == 7) && (bday <= 22))) { cout << "Your sign is Cancer. You will meet someone special.\n"; if ((bday == 22) || (bday == 23)) cout << "You are on the cusp of being a Gemini. You will be proud.\n"; if ((bday == 21) || (bday == 22)) cout << "You are on the cusp of being a Leo. You will feel better spirtually.\n"; } else if (((month == 7) && (bday >= 23)) || ((month == 8) && (bday <= 22))) { cout << "Your sign is Leo. You will feel better spirtually.\n"; if ((bday == 23) || (bday == 24)) cout << "You are on the cusp of being a Cancer. You will meet someone special.\n"; if ((bday == 21) || (bday == 22)) cout << "You are on the cusp of being a Virgo. Your quality of life will improve.\n"; } else if (((month == 8) && (bday >= 23)) || ((month == 9) && (bday <= 22))) { cout << "Your sign is Virgo. Your quality of life will improve.\n"; if ((bday == 23) || (bday == 24)) cout << "You are on the cusp of being a Leo. You will feel better spirtually.\n"; if ((bday == 21) || (bday == 22)) cout << "You are on the cusp of being a Libra. You will have many children.\n"; } else if (((month == 9) && (bday >= 23)) || ((month == 10) && (bday <= 22))) { cout << "Your sign is Libra. You will have many children.\n"; if ((bday == 23) || (bday == 24)) cout << "You are on the cusp of being a Virgo. Your quality of life will improve.\n"; if ((bday == 21) || (bday == 22)) cout << "You are on the cusp of being a Scorpio. Your charity will be returned ten fold.\n"; } else if (((month == 10) && (bday >= 23)) || ((month == 11) && (bday <= 21))) { cout << "Your sign is Scorpio. Your charity will be returned ten fold.\n"; if ((bday == 23) || (bday == 24)) cout << "You are on the cusp of being a Libra. You will have many children.\n"; if ((bday == 20) || (bday == 21)) cout << "You are on the cusp of being a Sagittarius. You are surrounded by people who love you.\n"; } else if (((month == 11) && (bday >= 22)) || ((month == 12) && (bday <= 21))) { cout << "Your sign is Sagittarius. You are surrounded by people who love you.\n"; if ((bday == 22) || (bday == 23)) cout << "You are on the cusp of being a Scorpio. Your charity will be returned ten fold.\n"; if ((bday == 20) || (bday == 21)) cout << "You are on the cusp of being a Capricorn. You will have a financial boost in your future.\n"; } else if (((month == 12) && (bday >= 22)) || ((month == 1) && (bday <= 19))) { cout << "Your sign is Capricorn. You will have a financial boost in your future.\n"; if ((bday == 22) || (bday == 23)) cout << "You are on the cusp of being a Sagittarius. You are surrounded by people who love you.\n"; if ((bday == 19) || (bday == 20)) cout << "You are on the cusp of being a Aquarius. Your life will be filled with love & happiness.\n"; } else if (((month == 1) && (bday >= 20)) || ((month == 2) && (bday <= 18))) { cout << "Your sign is Aquarius. Your life will be filled with love & happiness.\n"; if ((bday == 22) || (bday == 23)) cout << "You are on the cusp of being a Capricorn. You will have a financial boost in your future.\n"; if ((bday == 19) || (bday == 20)) cout << "You are on the cusp of being a Pisces. Your harvest will be bountiful.\n"; } else if (((month == 2) && (bday >= 19)) || ((month == 3) && (bday <= 20))) { cout << "Your sign is Pisces. Your harvest will be bountiful.\n"; if ((month == 2) && ((bday == 19) || (bday == 20))) cout << "You are on the cusp of being a Aquarius. Your life will be filled with love & happiness.\n"; if ((month == 3) && ((bday == 19) || (bday == 20))) cout << "You are on the cusp of being a Aries. You will live long.\n"; } else cout << "Input error. You entered an invalid month and birthday.\n"; } else cout << "Thank you for using this program.\n"; } while (choice == 'y' || choice == 'Y'); } /* Would you like to run a program that will give your horoscope? Enter y for yes, n for no, then press Enter key. y Enter your month & birthday as integers, separated by a space. 2 20 Your sign is Pisces. Your harvest will be bountiful. You are on the cusp of being a Aquarius. Your life will be filled with love & ha ppiness. Would you like to run a program that will give your horoscope? Enter y for yes, n for no, then press Enter key. y Enter your month & birthday as integers, separated by a space. 3 20 Your sign is Pisces. Your harvest will be bountiful. You are on the cusp of being a Aries. You will live long. Would you like to run a program that will give your horoscope? Enter y for yes, n for no, then press Enter key. Y Enter your month & birthday as integers, separated by a space. 5 10 Your sign is Taurus. You will be happy. Would you like to run a program that will give your horoscope? Enter y for yes, n for no, then press Enter key. n Thank you for using this program. Press any key to continue . . . */