Search
 
SCRIPT & CODE EXAMPLE
 

C

C program to input the month number and output the month name using switch statement

#include<stdio.h>

void main()
{
    int choise;
    printf("
 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");
    }


}
Comment

PREVIOUS NEXT
Code Example
C :: empiler une pile on c 
C :: unpack and repack deb package 
C :: search sorted array c 
C :: powershell list big files 
C :: build a linked list in c 
C :: c memcpy array 
C :: Command to create a static library in C 
C :: print 100 times c 
C :: c pause for 1 second 
C :: Relational Operator in C language 
C :: how to open form in vb.net 
C :: %g and %e in c 
C :: static variable c 
C :: unused variable in c 
C :: *= operator 
C :: two way communication between child and parent processes in C using pipes 
C :: android studio sdkmanager always accept 
C :: spacemacs start server 
C :: convert c code to python online free 
C :: C #if, #elif and #else Directive 
C :: tytykjtuky 
C :: pointeur de pointeur en language c 
C :: C Change Value of Array elements 
C :: assembly lea instruction 
C :: peripheral bus clock pic32 
C :: find a substring within a string in c and return the index 
C :: using tables as arguments in c++/c 
C :: Trasmettere variabile float attraverso seriale 
C :: c addition 
C :: formula to find the area of a trapezium in c 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =