zoukankan      html  css  js  c++  java
  • POJ 1298

    #include <cstdio>
    #include <cstring>
    #include <cctype>
    #include <cstdlib>
    using namespace std;
    char str[210];
    int main()
    {
        int i,j,k,T;
        char str0[10];
        while(scanf("%s",str0),strcmp(str0,"ENDOFINPUT"))
        {
            getchar();
            memset(str0,0,sizeof(str0));
            memset(str,0,sizeof(str));
            while(gets(str),strcmp(str,"END"))
            {
                for(i=0;str[i]!='\0';i++)
                {
                    if(isalpha(str[i]))
                    {
                        int temp=(int)str[i]-5;
                        printf("%c",temp>64?temp:temp+26);
                    }
                    else
                        printf("%c",str[i]);
                }
                putchar('\n');//必须的,否则end不会显示PE 
                memset(str,0,sizeof(str));
            }
        }
        system("pause");
        return 0;
    }
                        
                        
    
  • 相关阅读:
    linux-常用命令
    linux
    测试基础
    链家笔试1
    链家笔试2
    链家笔试3
    MySql优化
    Http1.1和Http2.0
    Charles学习
    链表中倒数第k个结点
  • 原文地址:https://www.cnblogs.com/hxsyl/p/2625617.html
Copyright © 2011-2022 走看看