#include <iostream> #include <iomanip> using namespace std; void say(int n){ switch (n) { case 0: cout<<"ling "; break; case 1: cout<<"yi "; break; case 2: cout<<"er "; break; case 3: cout<<"san "; break; case 4: cout<<"si "; break; case 5: cout<<"wu "; break; case 6: cout<<"liu "; break; case 7: cout<<"qi "; break; case 8: cout<<"ba "; break; case 9: cout<<"jiu "; break; case 10: cout<<"shi "; } } int main(int argc, char *argv[]) { int n,c=0; cin>>n; //十位和个位 int s = n/10; int g = n%10; if (n < 10 ) { say(n); }else { if (s > 1) { say(s); } say(10); if (g != 0) { say(g); } } return 0; } /************************************************************** Problem: 1240 User: mariooo Language: C Result: Compile Error ****************************************************************/