string num_turning(string a){ //字母打进来,数字输出去 string b; for(int i = 0;i < a.size();i++){ int sub = int(a[i]) - 32; if(65 <= sub && sub <= 67) b = b + "1"; if(68 <= sub && sub <= 70) b = b + "2"; if(71 <= sub && sub <= 73) b = b + "3"; if(74 <= sub && sub <= 76) b = b + "4"; if(77 <= sub && sub <= 78) b = b + "5"; if(79 <= sub && sub <= 81) b = b + "6"; if(82 <= sub && sub <= 84) b = b + "7"; if(85 <= sub && sub <= 87) b = b + "8"; if(88 <= sub && sub <= 90) b = b + "9"; } return b; }