正题
大意
就是将1到10改为
“unu”,”du”,”tri”,”kvar”,”kvin”,”ses”,”sep”,”ok”,”nau”,”dek”
然后如果是十几:
如12:”dek du”
如果是几十几:
如88:”dudek du”
解题思路
就是判断就好了,比打表还快
代码
#include<cstdio>
using namespace std;
int x;
char s[10][5]={"dek","unu","du","tri","kvar","kvin","ses","sep","ok","nau"};
//数字表
int main()
{freopen("shijie.in","r",stdin);freopen("shijie.out","w",stdout);scanf("%d",&x);if (x>=20) printf("%s",s[x/10]);//几十几if (x>=10) //十几或几十几{printf("%s",s[0]);if (x%10) printf(" ");}x%=10;if (x) printf("%s",s[x]);//输出个位
}