密码翻译(空格后的字符无法输出)
#include<stdio.h>void main()
{
int i=0;
char string[100];
printf("the code is \n ");
scanf("%s",string);
printf("the original is \n");
while((string[i])!='\0')
{
if(string[i]>'A'&&string[i]<'Z')
{
string[i]=155-string[i];
}
if(string[i]>'a'&&string[i]<'z')
{
string[i]=219-string[i];
}
else
{
string[i]=string[i];
}
i++;
}
printf("%s",string);
}