menu search
brightness_auto
more_vert
Write a program to input a month number of the year and display the corresponding month of year
thumb_up_off_alt 0 like thumb_down_off_alt 0 dislike

1 Answer

more_vert
 
verified
Best answer

Code ! 

#include<stdio.h>

void main()
{
    int choise;
    printf("\n enter the month number : ");
    scanf("%d",&choise);
    switch(choise)
    {
        case 1: printf("Month is :  January");
                break;
        case 2: printf("Month is :  February");
                break;
        case 3: printf("Month is :  March");
                break;
        case 4: printf("Month is :  April");
                break;
        case 5: printf("Month is :  May");
                break;
        case 6: printf("Month is :  June");
                break;
        case 7: printf("Month is :  July");
                break;
        case 8: printf("Month is :  August");
                break;
        case 9: printf("Month is :  September");
                break;
        case 10: printf("Month is :  October");
                break;
        case 11: printf("Month is :  November");
                break;
        case 12: printf("Month is :  December");
                break;
        default : printf("invalid number");
    }


}

Output::

thumb_up_off_alt 0 like thumb_down_off_alt 0 dislike
more_vert
This code is for turbo c++ !

Related questions

thumb_up_off_alt 0 like thumb_down_off_alt 0 dislike
0 answers
thumb_up_off_alt 0 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 0 like thumb_down_off_alt 0 dislike
0 answers
thumb_up_off_alt 0 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 0 like thumb_down_off_alt 0 dislike
1 answer

Welcome to Brainiak.in , where you can ask questions and receive answers from other members of the community ,

There is many categories for every students  CBSE , Maharashtra board , JEE , NEET  and we will add more categories

and make brainiak one of the most loved community of students

Advertisement

Get Your advertisement on Brainiak.in Buy Adspace

3.0k questions

2.5k answers

24 comments

340 users

...