Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.68 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Horoscope {
  4. private static final String Aquarius = "Today will be a good day.";
  5. private static final String Pisces = "You will meet the lover of your life today.";
  6. private static final String Aries = "Beware of the color red.";
  7. private static final String Taurus = "Your friends will surprise you.";
  8. private static final String Gemini = "You will make a tough decision today.";
  9. private static final String Cancer = "Good luck will come to you.";
  10. private static final String Leo = "You have an easy attitude today.";
  11. private static final String Virgo = "You don't worry about the things that usually bother you today.";
  12. private static final String Libra = "You need to say goodbye to someone, but it won't be as difficult as you fear it will.";
  13. private static final String Scorpio = "Bad luck.";
  14. private static final String Sagittarius = "Good luck.";
  15. private static final String Capricorn = "Yawwwww.";
  16.  
  17. public static void main(String[] args)
  18. {
  19. Scanner reader = new Scanner(System.in);
  20. System.out.println("Enter your birthday month in a number: ");
  21. int Month = reader.nextInt();
  22. System.out.println("Enter the birthday date in a number: ");
  23. int Date = reader.nextInt();
  24.  
  25. if ((Month == 1 && Date >= 20 && Date <= 31) || (Month == 2 && Date <= 18 && Date >= 1))
  26. {
  27. System.out.println("You are Aquarius! \nThis is your daily horoscope: " + Aquarius);
  28. }
  29. else if ((Month == 2 && Date >= 19 && Date <= 29) || (Month == 3 && Date <= 20 && Date >= 1))
  30. {
  31. System.out.println("You are Pisces! \nThis is your daily horoscope: " + Pisces);
  32. }
  33. else if ((Month == 3 && Date >= 21 && Date <= 31) || (Month == 4 && Date <= 19 && Date >= 1))
  34. {
  35. System.out.println("You are Aries! \nThis is your daily horoscope: " + Aries);
  36. }
  37. else if ((Month == 4 && Date >= 20 && Date <= 30) || (Month == 5 && Date <= 20 && Date >= 1))
  38. {
  39. System.out.println("You are Taurus! \nThis is your daily horoscope: " + Taurus);
  40. }
  41. else if ((Month == 5 && Date >= 21 && Date <= 31) || (Month == 6 && Date <= 20 && Date >= 1))
  42. {
  43. System.out.println("You are Gemini! \nThis is your daily horoscope: " + Gemini);
  44. }
  45. else if ((Month == 6 && Date >= 21 && Date <= 30) || (Month == 7 && Date <= 22 && Date >= 1))
  46. {
  47. System.out.println("You are Cancer! \nThis is your daily horoscope: " + Cancer);
  48. }
  49. else if ((Month == 7 && Date >= 23 && Date <= 31) || (Month == 8 && Date <= 22 && Date >= 1))
  50. {
  51. System.out.println("You are Leo! \nThis is your daily horoscope: " + Leo);
  52. }
  53. else if ((Month == 8 && Date >= 23 && Date <= 31) || (Month == 9 && Date <= 22 && Date >= 1))
  54. {
  55. System.out.println("You are Virgo! \nThis is your daily horoscope: " + Virgo);
  56. }
  57. else if ((Month == 9 && Date >= 23 && Date <= 30) || (Month == 10 && Date <= 22 && Date >= 1))
  58. {
  59. System.out.println("You are Libra! \nThis is your daily horoscope: " + Libra);
  60. }
  61. else if ((Month == 10 && Date >= 23 && Date <= 31) || (Month == 11 && Date <= 21 && Date >= 1))
  62. {
  63. System.out.println("You are Scorpio! \nThis is your daily horoscope: " + Scorpio);
  64. }
  65. else if ((Month == 11 && Date >= 22 && Date <= 30) || (Month == 12 && Date <= 21 && Date >= 1))
  66. {
  67. System.out.println("You are Sagittarius! \nThis is your daily horoscope: " + Sagittarius);
  68. }
  69. else if ((Month == 12 && Date >= 22 && Date <= 31) || (Month == 1 && Date <= 19 && Date >= 1))
  70. {
  71. System.out.println("You are Capricorn! \nThis is your daily horoscope: " + Capricorn);
  72. }
  73. else if (Month > 12 || Month < 1)
  74. {
  75. System.out.println("The month is invalid");
  76. }
  77. else
  78. {
  79. System.out.println("The day is invalid");
  80. }
  81. }
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement