programplug Logo




C Switch Statement


The switch statement is used to execute the multiple conditions.By using switch statement we don't need a lot of code.It saves time.


switch(expression)
{    
case 1:Statement    
       break;   
case 2:Statement   
       beak;  
......    
    
default:if case is not matched    
} 
 
#include
void main()
{
int n;
printf("enter your choice:");    
scanf("%d",&n);    
switch(n)
{ 
  case 1:printf("Monday");    
  break; 
  case 2:printf("Tuesday");    
  break; 
  case 3:printf("Wednesday");    
  break; 
  case 4:printf("Thursday");    
  break; 
  case 5:printf("Friday");    
  break; 
  case 6:printf("Saturday");    
  break; 
  case 7:printf("Sunday");    
  break; 
  default:    
  printf("You Have Select Wrong Choice");    
}   
}







Our Services

Developing Cheapest Websites
Offer Digital Marketing
Provide College Projects
Attractive Website Developing
Summer Training,Industrial Training
SCO,SMO

Contact Us

Dehradun Uttarakhand India
www.programplug.com
info@programplug.com
08534019974
Designed By : Mridul Gupta

Other Link

About Us

Contact Us

Disclaimer

Privacy Policy