【文件属性】:
文件名称:星期(数字——英文)转化.txt
文件大小:501B
文件格式:TXT
更新时间:2022-12-20 13:40:50
c++ 转换 星期
#include
using namespace std;
int main()
{
int i;
cout << "输入数字(1-7):";
cin >> i;
switch (i)
{
case 1:
{cout << "Monday" << endl;
break; }
case 2:
{ cout << "Tuesday" << endl;
break; }
case 3:
{ cout << "Wednesday" << endl;
break;
}
case 4:
{ cout << "Thursday" << endl;
break; }
case 5:
{ cout << "Friday" << endl;
break; }
case 6:
{ cout << "Saturday" << endl;
break;
}
case 7:
{ cout << "Sunday" << endl;
break;
}
}
}