URI 1052 - Month Solution in C,C++,Python | URI Online Judge Solution 1052 - Month

URI 1052 - Month Solution in C,C++,Python | URI Online Judge Solution 1052 - Month

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

4

April

URI 1052 - Month Solution in C,C++,Python | URI Online Judge Solution 1052 - Month:

                                        Demonstration:

It's a not a hard problem.You just have to check the conditions by using if-else  to find the combination of the table given.Then you have to print those values according to the problem's statement..

Example:

There are twelve months in a year:



If Number is 5,Month name will be May!


N.B: Don't copy paste the code as same. Just try to understand it and try yourself. It would be better for you.


  URI Problem 1052 Solution in C :   

  URI Online Judge 1052 Solve  in C :                                                                             
#include<stdio.h>
int main()
{
    int N;
    scanf("%d", &N);

    if(N == 1)  printf("January\n");
    else if (N == 2)  printf("February\n");
    else if (N == 3)  printf("March\n");
    else if (N == 4)  printf("April\n");
    else if (N == 5)  printf("May\n");
    else if (N == 6)  printf("June\n");
    else if (N == 7)  printf("July\n");
    else if (N == 8)  printf("August\n");
    else if (N == 9)  printf("September\n");
    else if (N == 10)  printf("October\n");
    else if (N == 11)  printf("November\n");
    else if (N == 12)  printf("December\n");
    return 0;
}

0 Response to URI 1052 - Month Solution in C,C++,Python | URI Online Judge Solution 1052 - Month

Post a Comment