Advertisement
Guest User

astrology

a guest
Oct 18th, 2019
2,266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.46 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class Astrology {
  3. public static void main(String[] args) {
  4.  
  5. Scanner input = new Scanner(System.in);
  6. double m;
  7. double d;
  8. System.out.print("Please enter your birth month (e.x. January = 1, February = 2 ect \r\nMonth: ");
  9. m = input.nextDouble();
  10. System.out.print("Now, please enter the day you we're born: ");
  11. d = input.nextDouble();
  12. if (m > 12) {
  13. System.out.println("Were you born on another planet? We have 12 months here, try again!");
  14. System.exit(0);
  15. }
  16. else if (d > 31) {
  17. System.out.println("Please enter a real day!");
  18. System.exit(0);
  19. }
  20. else
  21.  
  22. if ((m == 2)&&(d > 29)) {
  23. System.out.println("Wrong!");
  24. System.exit(0);
  25. }
  26. else if ((m == 4)&&(d > 30)) {
  27. System.out.println("Wrong!");
  28. System.exit(0);
  29. }
  30. else if ((m == 6)&&(d > 30)) {
  31. System.out.println("Wrong!");
  32. System.exit(0);
  33. }
  34. else if ((m == 8)&&(d > 30)) {
  35. System.out.println("Wrong!");
  36. System.exit(0);
  37. }
  38. else if ((m == 10)&&(d > 30)) {
  39. System.out.println("Wrong!");
  40. System.exit(0);
  41. }
  42. else if ((m == 12)&&(d > 30)) {
  43. System.out.println("Wrong!");
  44. System.exit(0);
  45. }
  46.  
  47. else
  48.  
  49.  
  50. if ((m == 3)&&(d >= 21)) {
  51. System.out.println("You are an Aries!");
  52. System.out.println("You will find good fortune in your near future.");
  53. System.exit(0);
  54. }
  55. else if ((m == 4)&&(d <= 19)) {
  56. System.out.println("You are an Aries!");
  57. System.out.println("You will find good fortune in your near future.");
  58. System.exit(0);
  59. }
  60. else if ((m == 4)&&(d >= 20)) {
  61. System.out.println("You are a Taurus!");
  62. System.out.println("You will have bad luck today, sorry.");
  63. System.exit(0);
  64. }
  65. else if ((m == 5)&&(d <= 20)) {
  66. System.out.println("You are a Taurus!");
  67. System.out.println("You will have bad luck today, sorry.");
  68. System.exit(0);
  69. }
  70. else if ((m == 5)&&(d >= 21)) {
  71. System.out.println("You are a Gemini!");
  72. System.out.println("You are blessed, everything will seem easier for you today. :)");
  73. System.exit(0);
  74. }
  75. else if ((m == 6)&&(d <= 21)) {
  76. System.out.println("You are a Gemini!");
  77. System.out.println("You are blessed, everything will seem easier for you today. :)");
  78. System.exit(0);
  79. }
  80. else if ((m == 6)&&(d >= 22)) {
  81. System.out.println("You are a Cancer!");
  82. System.out.println("You will reconnect with a loved one soon.");
  83. System.exit(0);
  84. }
  85. else if ((m == 7)&&(d <= 22)) {
  86. System.out.println("You are a Cancer!");
  87. System.out.println("You will reconnect with a loved one soon.");
  88. System.exit(0);
  89. }
  90. else if ((m == 7)&&(d >= 23)) {
  91. System.out.println("You are a Leo!");
  92. System.out.println("Youare feeling quite mean today.");
  93. System.exit(0);
  94. }
  95. else if ((m == 8)&&(d <= 22)) {
  96. System.out.println("You are a Leo!");
  97. System.out.println("Youare feeling quite mean today.");
  98. System.exit(0);
  99. }
  100. else if ((m == 8)&&(d >= 23)) {
  101. System.out.println("You are a Virgo!");
  102. System.out.println("You are feeling quite mean today.");
  103. System.exit(0);
  104. }
  105. else if ((m == 9)&&(d <= 22)) {
  106. System.out.println("You are a Virgo!");
  107. System.out.println("You are feeling quite mean today.");
  108. System.exit(0);
  109. }
  110. else if ((m == 9)&&(d >= 23)) {
  111. System.out.println("You are a Libra!");
  112. System.out.println("I see much dismay in your day.");
  113. System.exit(0);
  114. }
  115. else if ((m == 10)&&(d <= 22)) {
  116. System.out.println("You are an Libra!");
  117. System.out.println("I see much dismay in your day.");
  118. System.exit(0);
  119. }
  120. else if ((m == 10)&&(d >= 23)) {
  121. System.out.println("You are a Scorpio!");
  122. System.out.println("The stars will align and you will find fortune.");
  123. System.exit(0);
  124. }
  125. else if ((m == 11)&&(d <= 21)) {
  126. System.out.println("You are a Scorpio!");
  127. System.out.println("The stars will align and you will find fortune.");
  128. System.exit(0);
  129. }
  130. else if ((m == 11)&&(d >= 22)) {
  131. System.out.println("You are a Sagittarius!");
  132. System.out.println("You will have a completely average day.");
  133. System.exit(0);
  134. }
  135. else if ((m == 12)&&(d <= 21)) {
  136. System.out.println("You are a Sagittarius!");
  137. System.out.println("You will have a completely average day.");
  138. System.exit(0);
  139. }
  140. else if ((m == 12)&&(d >= 22)) {
  141. System.out.println("You are a Capricorn!");
  142. System.out.println("You will find something long ago lost.");
  143. System.exit(0);
  144. }
  145. else if ((m == 1)&&(d <= 19)) {
  146. System.out.println("You are a Capricorn!");
  147. System.out.println("You will find something long ago lost.");
  148. System.exit(0);
  149. }
  150. else if ((m == 1)&&(d >= 20)) {
  151. System.out.println("You are an Aquarius!");
  152. System.out.println("Something will greatly upset you today.");
  153. System.exit(0);
  154. }
  155. else if ((m == 2)&&(d <= 18)) {
  156. System.out.println("You are an Aquarius!");
  157. System.out.println("Something will greatly upset you today.");
  158. System.exit(0);
  159. }
  160. else if ((m == 2)&&(d >= 19)) {
  161. System.out.println("You are a Pisces!");
  162. System.out.println("Today will be considered one of the best days for you.");
  163. System.exit(0);
  164. }
  165. else if((m == 3)&&(d <= 20)) {
  166. System.out.println("You are a Pisces!");
  167. System.out.println("Today will be considered one of the best days for you.");
  168. System.exit(0);
  169. }
  170. else {
  171. System.out.println("This will never happen because we covered all possible inputs.");
  172. }
  173.  
  174. input.close();
  175. System.exit(0);
  176.  
  177. }
  178.  
  179. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement