scanf()中最好不要加符号,空格也不要,要不然会造成输入混乱。#include<stdio.h>
int main(void)
{
char ch, ch1, ch2;
printf("ÊäÈëÈý¸öÊý×Ö:");
scanf("%d%d%d", &ch, &ch1, &ch2);
printf("%c %c %c.\n", ch, ch1, ch2);
return 0;
} 像这样就好多了
int main(void)
{
char ch, ch1, ch2;
printf("ÊäÈëÈý¸öÊý×Ö:");
scanf("%d%d%d", &ch, &ch1, &ch2);
printf("%c %c %c.\n", ch, ch1, ch2);
return 0;
} 像这样就好多了