Saturday, April 30, 2016

URI Online Judge Solution 1052 in Java language || Month



URI Online Judge | 1052

Month

Adapted by Neilor Tonin, URI  Brazil
Timelimit: 1
Read an integer number between 1 and 12, including. Corresponding to this number, you must print the month of the year, in english, with the first letter in uppercase.

Input

The input contains only an integer number.

Output

Print the name of the month according to the input number, with the first letter in uppercase.
Input SampleOutput Sample
4April



URI Online Judge Solution 1052 in Java language || Month

import java.io.IOException;
import java.util.Scanner;


public class Main {

    public static void main(String[] args) throws IOException {

        
int N;
Scanner input =new Scanner(System.in);
switch (N =input.nextInt()) {
case 1:
System.out.print("January\n");
break;
case 2:
System.out.print("February\n");
break;
case 3:
System.out.print("March\n");
break;
case 4:
System.out.print("April\n");
break;
case 5:
System.out.print("May\n");
break;
case 6:
System.out.print("June\n");
break;
case 7:
System.out.print("July\n");
break;
case 8:
System.out.print("August\n");
break;
case 9:
System.out.print("September\n");
break;
case 10:
System.out.print("October\n");
break;
case 11:
System.out.print("November\n");
break;
case 12:
System.out.print("December\n");
break;

default:
break;
}


    }

}



No comments:
Write comments

To know more about the problem, give us your valuable commment. We'll try to help you. Thanks

All rights reserved ©2016 -URI ONLINE JUDGE SOLUTION | Developed by Maniruzzaman Akash

© 2016 URI ONLINE JUDGE SOLUTION. Developed by Maniruzzaman Akash | Distributed By Gooyaabi Templates
Powered by Blogger.