Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Astrology {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- double m;
- double d;
- System.out.print("Please enter your birth month (e.x. January = 1, February = 2 ect \r\nMonth: ");
- m = input.nextDouble();
- System.out.print("Now, please enter the day you we're born: ");
- d = input.nextDouble();
- if (m > 12) {
- System.out.println("Were you born on another planet? We have 12 months here, try again!");
- System.exit(0);
- }
- else if (d > 31) {
- System.out.println("Please enter a real day!");
- System.exit(0);
- }
- else
- if ((m == 2)&&(d > 29)) {
- System.out.println("Wrong!");
- System.exit(0);
- }
- else if ((m == 4)&&(d > 30)) {
- System.out.println("Wrong!");
- System.exit(0);
- }
- else if ((m == 6)&&(d > 30)) {
- System.out.println("Wrong!");
- System.exit(0);
- }
- else if ((m == 8)&&(d > 30)) {
- System.out.println("Wrong!");
- System.exit(0);
- }
- else if ((m == 10)&&(d > 30)) {
- System.out.println("Wrong!");
- System.exit(0);
- }
- else if ((m == 12)&&(d > 30)) {
- System.out.println("Wrong!");
- System.exit(0);
- }
- else
- if ((m == 3)&&(d >= 21)) {
- System.out.println("You are an Aries!");
- System.out.println("You will find good fortune in your near future.");
- System.exit(0);
- }
- else if ((m == 4)&&(d <= 19)) {
- System.out.println("You are an Aries!");
- System.out.println("You will find good fortune in your near future.");
- System.exit(0);
- }
- else if ((m == 4)&&(d >= 20)) {
- System.out.println("You are a Taurus!");
- System.out.println("You will have bad luck today, sorry.");
- System.exit(0);
- }
- else if ((m == 5)&&(d <= 20)) {
- System.out.println("You are a Taurus!");
- System.out.println("You will have bad luck today, sorry.");
- System.exit(0);
- }
- else if ((m == 5)&&(d >= 21)) {
- System.out.println("You are a Gemini!");
- System.out.println("You are blessed, everything will seem easier for you today. :)");
- System.exit(0);
- }
- else if ((m == 6)&&(d <= 21)) {
- System.out.println("You are a Gemini!");
- System.out.println("You are blessed, everything will seem easier for you today. :)");
- System.exit(0);
- }
- else if ((m == 6)&&(d >= 22)) {
- System.out.println("You are a Cancer!");
- System.out.println("You will reconnect with a loved one soon.");
- System.exit(0);
- }
- else if ((m == 7)&&(d <= 22)) {
- System.out.println("You are a Cancer!");
- System.out.println("You will reconnect with a loved one soon.");
- System.exit(0);
- }
- else if ((m == 7)&&(d >= 23)) {
- System.out.println("You are a Leo!");
- System.out.println("Youare feeling quite mean today.");
- System.exit(0);
- }
- else if ((m == 8)&&(d <= 22)) {
- System.out.println("You are a Leo!");
- System.out.println("Youare feeling quite mean today.");
- System.exit(0);
- }
- else if ((m == 8)&&(d >= 23)) {
- System.out.println("You are a Virgo!");
- System.out.println("You are feeling quite mean today.");
- System.exit(0);
- }
- else if ((m == 9)&&(d <= 22)) {
- System.out.println("You are a Virgo!");
- System.out.println("You are feeling quite mean today.");
- System.exit(0);
- }
- else if ((m == 9)&&(d >= 23)) {
- System.out.println("You are a Libra!");
- System.out.println("I see much dismay in your day.");
- System.exit(0);
- }
- else if ((m == 10)&&(d <= 22)) {
- System.out.println("You are an Libra!");
- System.out.println("I see much dismay in your day.");
- System.exit(0);
- }
- else if ((m == 10)&&(d >= 23)) {
- System.out.println("You are a Scorpio!");
- System.out.println("The stars will align and you will find fortune.");
- System.exit(0);
- }
- else if ((m == 11)&&(d <= 21)) {
- System.out.println("You are a Scorpio!");
- System.out.println("The stars will align and you will find fortune.");
- System.exit(0);
- }
- else if ((m == 11)&&(d >= 22)) {
- System.out.println("You are a Sagittarius!");
- System.out.println("You will have a completely average day.");
- System.exit(0);
- }
- else if ((m == 12)&&(d <= 21)) {
- System.out.println("You are a Sagittarius!");
- System.out.println("You will have a completely average day.");
- System.exit(0);
- }
- else if ((m == 12)&&(d >= 22)) {
- System.out.println("You are a Capricorn!");
- System.out.println("You will find something long ago lost.");
- System.exit(0);
- }
- else if ((m == 1)&&(d <= 19)) {
- System.out.println("You are a Capricorn!");
- System.out.println("You will find something long ago lost.");
- System.exit(0);
- }
- else if ((m == 1)&&(d >= 20)) {
- System.out.println("You are an Aquarius!");
- System.out.println("Something will greatly upset you today.");
- System.exit(0);
- }
- else if ((m == 2)&&(d <= 18)) {
- System.out.println("You are an Aquarius!");
- System.out.println("Something will greatly upset you today.");
- System.exit(0);
- }
- else if ((m == 2)&&(d >= 19)) {
- System.out.println("You are a Pisces!");
- System.out.println("Today will be considered one of the best days for you.");
- System.exit(0);
- }
- else if((m == 3)&&(d <= 20)) {
- System.out.println("You are a Pisces!");
- System.out.println("Today will be considered one of the best days for you.");
- System.exit(0);
- }
- else {
- System.out.println("This will never happen because we covered all possible inputs.");
- }
- input.close();
- System.exit(0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement