例题3-15

来源:互联网 发布:欧洲数据保护指令 编辑:程序博客网 时间:2024/05/20 11:53
#include <iostream>using namespace std;int main(){char c; while ((c=getchar())!='\n')   {if((c>='a' && c<='z') || (c>='A' && c<='Z'))      {c=c+4;       if(c>'Z' && c<='Z'+4 || c>'z')    c=c-26;      }    cout<<c;   } cout<<endl; system("pause"); return 0;}

原创粉丝点击