#include
int main(void)
{
char ch;
printf("Please enter a character.\n");
scanf("%c",&ch);
printf("The code for %c is %d.\n",ch,ch);
return 0;
}
為什麼我輸入字符時,按回車,屏幕並沒有出現打印的字符串,光標移到下一行的開頭?
char ch;
printf("Please enter a character.\n");
ch = getchar();
printf("The code for %c is %d.\n", ch, ch);
return 0;