杭电oj-1048

水题

#include<stdio.h>
#include<string.h>
int main()
{
    int temp;
    char a[222],*p;
    while(gets(a),strcmp(a,"ENDOFINPUT"))
    {
        gets(a);
        for(p=a;*p!='\0';p++)
        {
            if(*p>='A'&&*p<='Z')
            *p=((temp=(*p-'A'-5))<0?temp+26:temp)+'A';
        }
        puts(a);
        gets(a);
    }
    return 0;
}

猜你喜欢

转载自blog.csdn.net/qq_41048982/article/details/88778360