例子的写法总是那么清新怡人
当然我又忘记了等号!!
#include <fstream>
#include <string.h>
#include <cstdio>
using namespace std;
#define _cdebbug
void decipher(char messege[])
{
char plain[27] = "VWXYZABCDEFGHIJKLMNOPQRSTU";
char cipherEnd[201];
int i,cipherLen;
gets(messege);
cipherLen = strlen(messege);
for (i = 0; i < cipherLen; i++)
{
if (messege[i] >= 'A' && messege[i] <= 'Z')
messege[i] = plain[messege[i] - 'A'];
}
gets(cipherEnd);
return;
}
//全局数据
int main()
{
//重定向
#ifdef _cdebbug
freopen("F:\\input.txt","r",stdin );
#endif
char messege[201];
gets(messege);
while(strcmp(messege,"START") == 0)
{
decipher(messege);
printf("%s\n",messege);
gets(messege);
}
#ifdef _cdebbug
fclose(stdin);
#endif
return 0 ;
}