Description
请将一串长度为5的纯字母文本译成一个密码,密码规律如下:用原来的字母后面的第4个字母代替原来的字母。如C用G代替(文本中不存在W/w、X/x、Y/y、Z/z等字母),最后得到的文本即为密码。
Input
输入一串文本,长度固定为5。
Output
输出对应的密码。格式为:
password is 密码
Sample
Input
China
Output
password is Glmre
#include<stdio.h>
#include<string.h>
char x[80];
int main()
{
int i;
fgets(x);
for(i=0;i<=strlen(x);i++)
{
if(x[i]>='A' && x[i]<='Z')
{
printf("%c",x[i]);
}
else
{
if(x[i]>='a' && x[i]<='z')
{
printf("%c",x[i]);
}
}
}
}