为什么输入字符串时,中间加空格,就只能输出空格前面的?
#include<stdio.h>#define change 1
main()
{int i;
char s[80];
printf("请输入原文:");
scanf("%s",s);
#if change
{for(i=0;i<=80;i++)
{if(s[i]!='\0')
if(s[i]>'A'&&s[i]<'Z'||s[i]>'a'&&s[i]<'z')
s[i]=s [i]+1;
else if(s[i]=='Z'||s[i]=='z')
s [i ]=s-25;}
printf("%s",s);
}
#else
printf("%s",s);
#endif
}