标签:输出 无限 amp while getch iostream getc turn using
a b
b c
#include <iostream>
using namespace std;
int main()
{
char c;
while((c=getchar())!=EOF)//避免程序无限运行下去//
{
if((‘a‘<=c && c<=‘z‘) || (‘A‘<=c && c<=‘Z‘))
{
if((c==‘z‘) || (c==‘Z‘))
{
putchar(‘a‘);
}
else
putchar(c+1);
}
else putchar(c);
}
return 0;
}
标签:输出 无限 amp while getch iostream getc turn using
原文地址:http://www.cnblogs.com/programmer-monkey2271971745/p/6045136.html