解题思路:
注意事项:
参考代码:
#include<iostream> #include<string> using namespace std; int main() { string str; while(getline(cin,str)) { if(str=="END") break; int n=str.size(); for(int i=0;i<n;i++) { char ch=str[i]; if(ch=='A'||ch=='W'||ch=='F') str[i]='I'; else if(ch=='D'||ch=='P'||ch=='G'||ch=='B') str[i]='e'; else if(ch=='C') str[i]='L'; else if(ch=='M') str[i]='o'; else if(ch=='S') str[i]='v'; else if(ch=='L') str[i]='Y'; else if(ch=='X') str[i]='u'; } cout<<str<<endl; } return 0; }
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:633 |
C语言程序设计教程(第三版)课后习题5.5 (C语言代码)浏览:659 |
程序员的表白 (C语言代码)浏览:655 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:481 |
简单的for循环浏览:1408 |
C语言程序设计教程(第三版)课后习题6.3 (C语言代码)浏览:467 |
C语言程序设计教程(第三版)课后习题6.1 (C语言代码)浏览:512 |
C语言程序设计教程(第三版)课后习题8.9 (C语言代码)浏览:498 |
C语言程序设计教程(第三版)课后习题10.3 (C语言代码)浏览:839 |
【出圈】 (C++代码)简单循环浏览:628 |