Originally posted by nomad
EDIT: Nomad keeps editing his posts so now this one doesn't make any sense. Disregard it.
isLeapYear = consolein.nextBoolean();
if (isLeapYear) {
intdays = 29;
} else {
intdays = 28;
}
public class Checker {
public static void main(String[] args) {
int intyear = 1996; //assuming this is what the user entered.
int intdays; //you have this already from the user
//the below if from your logic for checking leap years. don't have
//the time to consult the wikipedia.
<Line removed to comply with homework posting guidelines>
System.out.println("The number of days if february is chosen for "+
intyear+" is "+intdays);
}
}
//this code is based on principle i.e where your switch evaluates to 2.
Comment