mengxin


私信TA

用户名:1000001

访问量:6645

签 名:

等  级
排  名 492
经  验 4508
参赛次数 0
文章发表 73
年  龄 0
在职情况 学生
学  校
专  业

  自我简介:

参考代码:

#include <stdio.h>
#include <stdlib.h>
#include<string.h>
#include<math.h>
int main()
{
    char str[100];
    char str1[4]={'E','N','D','\0'};
    while(scanf("%s",&str)!=EOF)
    {
        if(strcmp(str,str1)==0)
            break;
        int length=strlen(str);
        for(int i=0;i<length;i++)
        {
            switch(str[i])
            {
                case 'A':str[i]='I';break;
                case 'W':str[i]='I';break;
                case 'F':str[i]='I';break;
                case 'C':str[i]='L';break;
                case 'M':str[i]='o';break;
                case 'S':str[i]='v';break;
                case 'D':str[i]='e';break;
                case 'P':str[i]='e';break;
                case 'G':str[i]='e';break;
                case 'B':str[i]='e';break;
                case 'L':str[i]='Y';break;
                case 'X':str[i]='u';break;
                default:break;
            }
        }
        printf("%s\n",str);
    }
    return 0;
}

 

0.0分

0 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区