Monday, 6 January 2020

HAY THANK FOR VISIT

<<<<<<<LET's START WITH ANOTHER QUESTION>>>>>>>>>>>>>>>

Question--Write a program to read the month number and print the name of that month.


import java.util.*;
class Month
{
    void main()
    {
        Scanner sc=new Scanner(System.in);
        System.out.println("entre the month number");
        int n=sc.nextInt();
        switch(n)
        {
            case 1:
            System.out.println("January");
            break;
            case 2:
            System.out.println("February");
            break;
            case 3:
            System.out.println("March");
            break;
            case 4:
            System.out.println("Aprail");
            break;
            case 5:
            System.out.println("May");
            break;
            case 6:
            System.out.println("June");
            break;
            case 7:
            System.out.println("july");
            break;
            case 8:
            System.out.println("August");
            break;
            case 9:
            System.out.println("September");
            break;
            case 10:
            System.out.println("October");
            break;
            case 11:
            System.out.println("November");
            break;
            case 12:
            System.out.println("December");
            break;
            default:
            System.out.println("invalid input");
        }
    }
}
     
INPUT----5
OUTPUT----MAY


        IF THIS BLOG IF USEFUL FOR YOU THEN SHARE IT WITH YOUR FRINDS AND LIKE COMMENT ON THIS BLOG HOW IS THIS BLOG..............

2 comments:

HAY THAKYOU FOE VISIT

Program(python):-Find duplicates in an array (Geeks for geek problem)

QUESTION:- Given an array  a  of size  N  which contains elements from  0  to  N-1 , you need to find all the elements occurring more than o...