jeudi 27 novembre 2014

Too large of an integer


Vote count:

0




I am making a program using Java that will output the users zodiac sign. When I compile this code it highlights 0219 and says "integer number too large." I am a beginner so if this is a stupid error please be nice. Thanks



System.out.println("Please enter your birthday month and day as a four digit number");
System.out.println("(Ex: 0514 for May 14th):");
double d = key.nextDouble();
if (d >= 0101 && d <= 0120) {
System.out.println("You are a Capricorn.");
}
else if (d >= 0121 && d <= **0219**) {
System.out.println("You are an Aquarius.");
}
else if (d >= 0220 && d <= 0320) {
System.out.println("You are a Pisces.");
}
else if (d >= 0321 && d <= 0420) {
System.out.println("You are an Aries.");
}
else if (d >= 0421 && d <= 0521) {
System.out.println("You are a Taurus.");
}
else if (d >= 0522 && d <= 0621 ) {
System.out.println("You are a Gemini.");
}
else if (d >= 0622 && d <= 0723 ) {
System.out.println("You are a Cancer.");
}


asked 10 secs ago







Too large of an integer

Aucun commentaire:

Enregistrer un commentaire