不是很明白这个scanf返回值,为什么输入一个数据,无法运行while,求大佬帮忙
#include<stdio.h>int main (void)
{
int hh;
printf("Please enter a number \n");
scanf("%d",&hh);
while(scanf("%d",&hh)==1)
{
printf("%d",hh);
printf("Please enter the next number(q to quit)\n");
scanf("%d",&hh);
}
printf("Done!");
return 0;
}
[此贴子已经被作者于2023-8-20 17:19编辑过]