Title description
Enter a positive integer to indicate a certain day of the week. If the number is in [1,7], the corresponding English week name will be output, otherwise it means an input error. For example, input 2 to output "Tuesday"; input 7 to output "Sunday"; input an illegal value of 16, then output "Illegal day". (The output does not include double quotes)
Input requirements
Enter a positive integer.
Output requirements
Output the English week name corresponding to this day.
Input sample
2
Sample output
Tuesday
prompt
The numbers 1~7 correspond to: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday.
Reference program
#include<stdio.h>
int main()
{
int i;
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("Illegal day");
}
printf("\n");
return 0;
}