为什么两个scanf不能同时用执行一个scanf以后直接结束程序不触发下面一个scanf
程序代码:#include <stdio.h>
void test()
{
int m;
int d;
scanf("%d",&m);
scanf("%d",&d);
}
int main() {
test();
return 0;
}
程序代码:#include <stdio.h>
void test()
{
int m;
int d;
scanf("%d",&m);
scanf("%d",&d);
}
int main() {
test();
return 0;
}
2021-05-17 22:20
2021-05-17 22:37
2021-05-18 11:36
程序代码:void test()
{
int m;
int d;
scanf("%d",&m);
fflush(stdout);
scanf("%d",&d);
}

2021-05-20 02:05