Category: Control Structures

#include<stdio.h> /* Header Files*/

#include<conio.h>

void main()

{

int a; /* variable declration */

clrscr();

printf("Enter Week day no = ");

scanf("%d",&a);

switch(a) /*test expression*/

{ case 1:

printf("Sunday");

break;

case 2:

printf("Monday");

break;

case 3:

printf("Tuesday");

break;

case 4:

printf("Wednesday");

break;

case 5:

printf("Thrusday");

break;

case 6:

printf("Friday");

break;

case 7:

printf("Staturday");

break;

default:

printf("Wrong Day NO Insert.");

}

getch();

}

 



Dinesh ThakurDinesh Thakur is a Columinist and designer with strong passion and founder of Computer Notes. if you have any ideas or any request please get @me on Google+
linkedin FaceBook Twitter Google Plus