URI Problem (Month) 1052:
Month is a basic problem on URI online judge for novice problem solver.
You can find details on this Link.
import java.util.Scanner;
/**
* @Author : Muhammad Harun-Or-Roshid
* @Date : Oct 14, 2016
* @Time : 6:59:52 PM
*/
public class Uri1052 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String months[] = {"January","February","March","April","May","June",
"July","August","September","October","November","December"};
int month = sc.nextInt();
if(month>=1 && month<=12){
System.out.println(months[month-1]);
}
}
}
0 Comments