Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Horoscope {
- private static final String Aquarius = "Today will be a good day.";
- private static final String Pisces = "You will meet the lover of your life today.";
- private static final String Aries = "Beware of the color red.";
- private static final String Taurus = "Your friends will surprise you.";
- private static final String Gemini = "You will make a tough decision today.";
- private static final String Cancer = "Good luck will come to you.";
- private static final String Leo = "You have an easy attitude today.";
- private static final String Virgo = "You don't worry about the things that usually bother you today.";
- private static final String Libra = "You need to say goodbye to someone, but it won't be as difficult as you fear it will.";
- private static final String Scorpio = "Bad luck.";
- private static final String Sagittarius = "Good luck.";
- private static final String Capricorn = "Yawwwww.";
- public static void main(String[] args)
- {
- Scanner reader = new Scanner(System.in);
- System.out.println("Enter your birthday month in a number: ");
- int Month = reader.nextInt();
- System.out.println("Enter the birthday date in a number: ");
- int Date = reader.nextInt();
- if ((Month == 1 && Date >= 20 && Date <= 31) || (Month == 2 && Date <= 18 && Date >= 1))
- {
- System.out.println("You are Aquarius! \nThis is your daily horoscope: " + Aquarius);
- }
- else if ((Month == 2 && Date >= 19 && Date <= 29) || (Month == 3 && Date <= 20 && Date >= 1))
- {
- System.out.println("You are Pisces! \nThis is your daily horoscope: " + Pisces);
- }
- else if ((Month == 3 && Date >= 21 && Date <= 31) || (Month == 4 && Date <= 19 && Date >= 1))
- {
- System.out.println("You are Aries! \nThis is your daily horoscope: " + Aries);
- }
- else if ((Month == 4 && Date >= 20 && Date <= 30) || (Month == 5 && Date <= 20 && Date >= 1))
- {
- System.out.println("You are Taurus! \nThis is your daily horoscope: " + Taurus);
- }
- else if ((Month == 5 && Date >= 21 && Date <= 31) || (Month == 6 && Date <= 20 && Date >= 1))
- {
- System.out.println("You are Gemini! \nThis is your daily horoscope: " + Gemini);
- }
- else if ((Month == 6 && Date >= 21 && Date <= 30) || (Month == 7 && Date <= 22 && Date >= 1))
- {
- System.out.println("You are Cancer! \nThis is your daily horoscope: " + Cancer);
- }
- else if ((Month == 7 && Date >= 23 && Date <= 31) || (Month == 8 && Date <= 22 && Date >= 1))
- {
- System.out.println("You are Leo! \nThis is your daily horoscope: " + Leo);
- }
- else if ((Month == 8 && Date >= 23 && Date <= 31) || (Month == 9 && Date <= 22 && Date >= 1))
- {
- System.out.println("You are Virgo! \nThis is your daily horoscope: " + Virgo);
- }
- else if ((Month == 9 && Date >= 23 && Date <= 30) || (Month == 10 && Date <= 22 && Date >= 1))
- {
- System.out.println("You are Libra! \nThis is your daily horoscope: " + Libra);
- }
- else if ((Month == 10 && Date >= 23 && Date <= 31) || (Month == 11 && Date <= 21 && Date >= 1))
- {
- System.out.println("You are Scorpio! \nThis is your daily horoscope: " + Scorpio);
- }
- else if ((Month == 11 && Date >= 22 && Date <= 30) || (Month == 12 && Date <= 21 && Date >= 1))
- {
- System.out.println("You are Sagittarius! \nThis is your daily horoscope: " + Sagittarius);
- }
- else if ((Month == 12 && Date >= 22 && Date <= 31) || (Month == 1 && Date <= 19 && Date >= 1))
- {
- System.out.println("You are Capricorn! \nThis is your daily horoscope: " + Capricorn);
- }
- else if (Month > 12 || Month < 1)
- {
- System.out.println("The month is invalid");
- }
- else
- {
- System.out.println("The day is invalid");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement