How do I fix my java code to print out the correct thing?

Hello I am working on homework and I am trying to figure out what is wrong with my code so that it will print correctly. Write a Java program that prompt the user for the day and month (both integers) of his or her birthday, and then prints the appropriate astrological sign.

public class Horoscope {
public static void main(String args [] ) {
String birthday = System.console().readline("Enter your birthday, month then day.");
float value = Float.parseFloat(birthday);
if (month < 1 || month > 12) {
  System.out.println("Invalid month please try again.");
}

else if (day < 1 || day > 31) {
  System.out.println("Invalid day please try again.");
}

else if (month = 1 || month = 12) {
  
}

else if (day >= 22 || day <= 19); {
   System.out.println(birthday + "Capricorn");
  }
}
}

kmossman2 years ago

no looping?

incomplete astro chart

unnecessary 3rd if

incomplete logic in last if

You are not really asking that someone here does your homework for you?
Would not be right, would it?