home
Learn
screen_rotation
#include <stdio.h> #include <conio.h> void main(){ int dayNum; clrscr(); printf("\n This is a switch statement program."); printf("\n Enter number for day: "); scanf("%d",&dayNum); switch( dayNum ){ case 1: case 2: case 3: case 4: case 5: printf("\n Regular Days "); break; case 0: case 6: printf("\n Week end Days "); break; default: printf("\n Enter value between 0 to 6 "); break; } getch(); }
Program Output
This is a switch statement program. Enter number for day: 2 Regular Days