从键盘上输入数字星期,然后输出它的英文: 其对应关系是 1 Monday 2 Tuesday 3 Wednesday 4 Thursday 5 Friday 6 Saturday 7 Sunday

#include <iostream>   
using namespace std;  
int main()  
{  
    int a;
	cin>>a;
	if(a<8)
		if(a==1)
			cout<<"Monday";
		if(a==2)
                           cout<<"Tuesday";
		if(a==3)
			cout<<"Wednesday";
		if(a==4)
			cout<<"Thursday";
		if(a==5)
			cout<<"Friday";
		if(a==6)
			cout<<"Saturday";
		if(a==7)
			cout<<"Sunday";
    return 0;  
}  

你可能感兴趣的:(从键盘上输入数字星期,然后输出它的英文: 其对应关系是 1 Monday 2 Tuesday 3 Wednesday 4 Thursday 5 Friday 6 Saturday 7 Sunday)