Wednesday, September 10, 2014
BirthDAy
public static void main (String args []) throws IOException{
int day, month ,year;
BufferedReader z = new BufferedReader( new InputStreamReader(System.in));
System.out.println( " ENTER DATA AS NEEDED " + "\n");
System.out.print(" Enter day in number : ");
day = Integer.parseInt(z.readLine());
System.out.print(" Enter month in number : ");
month = Integer.parseInt(z.readLine());
System.out.print(" Enter year in number : ");
year = Integer.parseInt(z.readLine());
if(month == 1){
System.out.println("January" + " " + day + " , " + year);
}else if(month==2){
System.out.println("February"+" " + day + " , "+ year);
}else if(month==3){
System.out.println("March"+" " + day + " , "+ year);
}
else if(month==4){
System.out.println("April"+" " + day + " , "+ year);
}
else if(month==5){
System.out.println("May"+" " + day + " , "+ year);
}
else if(month==6){
System.out.println("June"+" " + day + " , "+ year);
}
else if(month==7){
System.out.println("July"+" " + day + " , "+ year);
}
else if(month==8){
System.out.println("August"+" " + day + " , "+ year);
}
else if(month==9){
System.out.println("September"+" " + day + " , "+ year);
}
else if(month==10){
System.out.println("October"+" " + day + " , "+ year);
}
else if(month==11){
System.out.println("November"+" " + day + " , "+ year);
}
else if(month==12){
System.out.println("December"+ " " + day + " , "+ year);
}
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment