Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package project;
- import java.util.Scanner;
- import java.math.*;
- public class newTest {
- static Scanner scanner = new Scanner(System.in);
- public static void monthName(int input){
- String Months [] = { "January","February","March","April","May","June","July","August","September","October","November", "December"};
- System.out.println(Months[input-1]);
- }
- public static void main(String[] args) {
- System.out.println("What is the number of the month?");
- int input = scanner.nextInt();
- monthName(input);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement