Problem G: C语言实验——输入数字星期,输出英文(选择结构-switch)
Time Limit:1 Sec
Memory Limit: 64 MB
Submit:205
Solved:124
[
Submit][
Status][
Web Board]
Description
从键盘上输入数字星期,然后输出它的英文: 其对应关系是 1 Monday 2 Tuesday 3 Wednesday 4 Thursday 5 Friday 6 Saturday 7 Sunday
Input
从键盘输入数字星期,
Output
输入的数字在1-7之内,则输出该数字对应的英文表示
Sample Input
2
Sample Output
Tuesday
HINT
#include
using namespace std;
int main ()
{
int week;
cin>>week;
switch(week)
{
case 1:cout<
case 2:cout<
case 3:cout<
case 4:cout<
case 5:cout<
case 6:cout<
case 7:cout<
default:cout<
}
return 0;
}