主题:为什么
#include <stdio.h>
int main (void)
{
int mi = -1;
char mch = 0;
char mch1 = 0;
scanf ("%d%c%c", &mi,&mch,&mch1);//问题为什么是:mch都回读到一个换行符(要怎样输入呢)
printf ("mi = %d, mch = %c, mch1 = %c\n", mi,mch,mch1);
return 0;
}
请教各位大哥啦!小弟初学!!谢谢!!
int main (void)
{
int mi = -1;
char mch = 0;
char mch1 = 0;
scanf ("%d%c%c", &mi,&mch,&mch1);//问题为什么是:mch都回读到一个换行符(要怎样输入呢)
printf ("mi = %d, mch = %c, mch1 = %c\n", mi,mch,mch1);
return 0;
}
请教各位大哥啦!小弟初学!!谢谢!!