请问这个题目有什么问题吗?在Code Blocks上可以正常运行,但是无法通过,不知道哪个地方出错了


#include <stdio.h>
int main()
{
char ch;
printf("输入:\n");
scanf("%c",&ch);
printf("输出:\n%c%c%c",ch-1,ch,ch+1);
return 0;
}
请问这个题目有什么问题吗?在Code Blocks上可以正常运行,但是无法通过,不知道哪个地方出错了


#include <stdio.h>
int main()
{
char ch;
printf("输入:\n");
scanf("%c",&ch);
printf("输出:\n%c%c%c",ch-1,ch,ch+1);
return 0;
}
将print()里的提示语句和换行符去掉应该就可以了。
修改如下:
#include <stdio.h>
int main()
{
char ch;
// 样例中的"输入","输出"等字符,是提示语句,应该是不用在代码中输出
// 所以去除相关提示字符串应该就可以了
scanf("%c",&ch);
printf("%c%c%c",ch-1,ch,ch+1);
return 0;
}
