/*报时
#include <iostream>
#include <map>
#include <string>
using namespace std;
map<int, string> mapA={{0,"zero"},{ 1, "one"},{ 2,"two"},{3,"three"}, {4,"four"}, {5,"five"}, {6,"six"}, {7,"seven"}, {8,"eight"}, {9,"nine"}, {10,"ten"}, {11,"eleven"}, {12,"twelve"}, {13,"thirteen"}, {14,"fourteen"}, {15,"fifteen"}, {16,"sixteen"}, {17,"seventeen:"}, {18,"eighteen"}, {19,"nineteen"}, {20,"twenty"},{30,"thirty"},{40,"forty"},{50,"fifty"}};
void trans(int num)
{
int shiwei,gewei;
if (num<=20||num%10==0) {
cout << mapA[num];
}
else if (num>20||num%10!=0)
{
shiwei=num/10;
shiwei*=10;
gewei=num%10;
cout << mapA[shiwei]<<" "<<mapA[gewei];
}
}
int main()
{
int hour,min;
cin >> hour >> min;
trans(hour);
cout << " ";
trans(min);
cout <<endl;
return 0;
}
*/
杂物
I'm so cute. Please give me money.
- 本文链接:https://blog.harumonia.moe/2018-12-02-others/
- 版权声明:本博客所有文章除特别声明外,均默认采用 许可协议。