fflush(stdin)在下面编码如何使用
#include<stdio.h>int main()
{
int max(int x, int y);
int a,b,c;
printf("please input a,b=\n");
scanf("%d,%d",&a,&b);
c = max(a,b);
printf ("max=%d\n",c);
return 0;
}
int max(int x , int y)
{
int z;
if(x>y) z = x;
else z = y;
return(z) ;
}
void scanf_buffer()
{
int a ,b;
while (scanf("%d%d",&a,&b) != EOF){
fflush(stdin);
printf("%d%d\n",a,b);
}
}