Subscribe For Free Updates!

We'll not spam mate! We promise.

Monday, November 4, 2013

Simple program of switch statement



#include<stdio.h>
int main()
{
    int a;
    printf("Enter number (1-4):");
    scanf("%d",&a);
    switch(a){
    case 1:
    printf("you entered 1\n");
    break;
    case 2:
    printf("you have entered 2\n");
    break;
    case 3:
    printf("you have entered 3\n");
    break;
    case 4:
    printf("you have entered 4\n");
    break;

    defult:
    printf("\nInvalid");
    }
    return 0;
}

Socializer
SOCIALIZE IT →
FOLLOW US →
SHARE IT →

0 comments:

Post a Comment

Contact Form

Name

Email *

Message *