输入一个0~6的整数,换成星期输出

#include
using namespace std;
int main()
{
int n;
cin >> n;
switch (n)
{
case 0:   cout <<"sunday" << endl;   break;
case 1:  cout << "monday" << endl;   break;
case 2:  cout << "tuseday" << endl;   break;  break;
case 3:  cout << "wensday" << endl;   break;  break;
case 4:   cout << "thursday" << endl;   break; break;
case 5:  cout << "friaday" << endl;   break;  break;
case 6:  cout << "saturday" << endl;   break;  break;
default:  break;
}
system("pause");
return  0;
}

你可能感兴趣的:(51Nod)