Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

Program to display the name of the day, depending upon the number entered from the keybord using the switch case Loop

Posted By: Bethany Hughes     Category: C Programming     Views: 8637

Write a program in C to display the name of the day, depending upon the number entered from the keybord using the switch case Loop.

Code for Program to display the name of the day, depending upon the number entered from the keybord using the switch case Loop in C Programming

#include <stdio.h>
#include <conio.h>
void main()
{
int i;
printf("enter the no :");
scanf("%d",&i);
switch(i)
{
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("please enter the no betwen 1 to 7  ");
      break;
}
getch();
}
  
Share: 



Bethany Hughes
Bethany Hughes author of Program to display the name of the day, depending upon the number entered from the keybord using the switch case Loop is from London, United Kingdom.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!