标签:
3 phqghumeayl nlfdxfircvs cxggbwkfnqd
74744863295 65339347287 29442953673
代码:
#include<iostream> using namespace std; int main() { int t; cin>>t; while(t--) { char str[11]; int i; cin>>str; for(i = 0;i < 11;i++) { if(str[i]==‘a‘||str[i]==‘b‘||str[i]==‘c‘) cout<<2; if(str[i]==‘d‘||str[i]==‘e‘||str[i]==‘f‘) cout<<3; if(str[i]==‘g‘||str[i]==‘h‘||str[i]==‘i‘) cout<<4; if(str[i]==‘j‘||str[i]==‘k‘||str[i]==‘l‘) cout<<5; if(str[i]==‘m‘||str[i]==‘n‘||str[i]==‘o‘) cout<<6; if(str[i]==‘p‘||str[i]==‘q‘||str[i]==‘r‘||str[i]==‘s‘) cout<<7; if(str[i]==‘t‘||str[i]==‘u‘||str[i]==‘v‘) cout<<8; if(str[i]==‘x‘||str[i]==‘y‘||str[i]==‘z‘||str[i]==‘w‘) cout<<9; } cout<<endl; } return 0; }
标签:
原文地址:http://blog.csdn.net/u012701023/article/details/46041773