Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main
- {
- public static void main(String[] args)
- {
- Scanner scan = new Scanner (System.in);
- int num = 0;
- System.out.println("On what day of the month were you born? (number)");
- int day = scan.nextInt();
- System.out.println("In which month were you born? (number)");
- int month = scan.nextInt();
- //Error
- if ((month < 1 || month > 12) || (day < 1 || day > 31)) {
- System.out.println("error");
- }
- //Sign
- if ((month == 3 && day >= 21) || (month == 4 && day <= 19)) {
- System.out.println("Your sign is Aries");
- num = 1;
- }
- if ((month == 4 && day >= 20) || (month == 5 && day <= 20)) {
- System.out.println("Your sign is Taurus");
- num = 2;
- }
- if ((month == 5 && day >= 21) || (month == 6 && day <= 20)) {
- System.out.println("Your sign is Gemini");
- num = 3;
- }
- if ((month == 6 && day >= 21) || (month == 7 && day <= 22)) {
- System.out.println("Your sign is Cancer");
- num = 4;
- }
- if ((month == 7 && day >= 23) || (month == 8 && day <= 22)) {
- System.out.println("Your sign is Leo");
- num = 5;
- }
- if ((month == 8 && day >= 23) || (month == 9 && day <= 22)) {
- System.out.println("Your sign is Virgo");
- num = 6;
- }
- if ((month == 9 && day >= 23) || (month == 10 && day <= 22)) {
- System.out.println("Your sign is Libra");
- num = 7;
- }
- if ((month == 10 && day >= 23) || (month == 11 && day <= 21)) {
- System.out.println("Your sign is Scorpio");
- num = 8;
- }
- if ((month == 11 && day >= 22) || (month == 12 && day <= 21)) {
- System.out.println("Your sign is Sagittarius");
- num = 9;
- }
- if ((month == 12 && day >= 22) || (month == 1 && day <= 19)) {
- System.out.println("Your sign is Capricorn");
- num = 10;
- }
- if ((month == 1 && day >= 20) || (month == 2 && day <= 18)) {
- System.out.println("Your sign is Aquarius");
- num = 11;
- }
- if ((month == 2 && day >= 19) || (month == 3 && day <= 20)) {
- System.out.println("Your sign is Pisces");
- num = 12;
- }
- //Birthday
- String dayy = ("bleh");
- String monthh = ("bleh");
- if (month == 1) {
- monthh = ("January");
- }
- if (month == 2) {
- monthh = ("Febuary");
- }
- if (month == 3) {
- monthh = ("March");
- }
- if (month == 4) {
- monthh = ("April");
- }
- if (month == 5) {
- monthh = ("May");
- }
- if (month== 6) {
- monthh = ("June");
- }
- if (month == 7) {
- monthh = ("July");
- }
- if (month == 8) {
- monthh = ("August");
- }
- if (month == 9) {
- monthh = ("September");
- }
- if (month == 10) {
- monthh = ("October");
- }
- if (month == 11) {
- monthh = ("November");
- }
- if (month == 12) {
- monthh = ("December");
- }
- //----------------------------------------------------------------------------------
- if (day == 1) {
- dayy = ("first");
- }
- if (day == 2) {
- dayy = ("second");
- }
- if (day == 3) {
- dayy = ("third");
- }
- if (day == 4) {
- dayy = ("fourth");
- }
- if (day == 5) {
- dayy = ("fifth");
- }
- if (day == 6) {
- dayy = ("sixth");
- }
- if (day == 7) {
- dayy = ("seventh");
- }
- if (day == 8) {
- dayy = ("eighth");
- }
- if (day == 9) {
- dayy = ("ninth");
- }
- if (day == 10) {
- dayy = ("tenth");
- }
- if (day == 11) {
- dayy = ("eleventh");
- }
- if (day == 12) {
- dayy = ("twelfth");
- }
- if (day == 13) {
- dayy = ("thirteenth");
- }
- if (day == 14) {
- dayy = ("fourteenth");
- }
- if (day == 15) {
- dayy = ("fifthteenth");
- }
- if (day == 16) {
- dayy = ("sixteenth");
- }
- if (day == 17) {
- dayy = ("seventeenth");
- }
- if (day == 18) {
- dayy = ("eighteenth");
- }
- if (day == 19) {
- dayy = ("nineteenth");
- }
- if (day == 20) {
- dayy = ("twentieth");
- }
- if (day == 21) {
- dayy = ("twenty-first");
- }
- if (day == 22) {
- dayy = ("twenty-second");
- }
- if (day == 23) {
- dayy = ("twenty-third");
- }
- if (day == 24) {
- dayy = ("twenty-fourth");
- }
- if (day == 25) {
- dayy = ("twenty-fifth");
- }
- if (day == 26) {
- dayy = ("twenty-sixth");
- }
- if (day == 27) {
- dayy = ("twenty-seventh");
- }
- if (day == 28) {
- dayy = ("twenty-eighth");
- }
- if (day == 29) {
- dayy = ("twenty-ninth");
- }
- if (day == 30) {
- dayy = ("thirtieth");
- }
- if (day == 31) {
- dayy = ("thirty-first");
- }
- if (!((month < 1 || month > 12) || (day < 1 || day > 31))) {
- System.out.println("Your birthday is: " + monthh + " " + dayy);
- }
- //Horoscope
- if (num == 1){
- System.out.println("Horoscope: Brushing your teeth with boiling water is very likely to burn your mouth.");
- }
- if (num == 2){
- System.out.println("Horoscope: In 10 minutes from now, you will be 10 minutes older.");
- }
- if (num == 3){
- System.out.println("Horoscope: If you take your age, add two, and then subtract two, that is your exact age.");
- }
- if (num == 4){
- System.out.println("Horoscope: If you put your hand in fire you will learn that it is not cold.");
- }
- if (num == 5){
- System.out.println("Horoscope: You should not drink boiling water.");
- }
- if (num == 6){
- System.out.println("Horoscope: If you cut off your hand it most likely won't grow back.");
- }
- if (num == 7){
- System.out.println("Horoscope: Getting out of your car to lick the road will not solve any of your personal problems.");
- }
- if (num == 8){
- System.out.println("Horoscope: Losing weight will cause you to weigh less.");
- }
- if (num == 9){
- System.out.println("Horoscope: If you are reading this, congratulations, you have been born.");
- }
- if (num == 10){
- System.out.println("Horoscope: If you are breathing right now, you are probably not a rock.");
- }
- if (num == 11){
- System.out.println("Horoscope: Switching to Geico could save you 15% or more on car insurance.");
- }
- if (num == 12){
- System.out.println("Horoscope: If you jump in an empty pool, it will probably not make a splash.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement