1060 Are They Equal (25 分) If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0 with simple chopping. Now given the number of significant digits on a machine and tw…
int i = 0; while (flag) { printf("please input a number >>> "); scanf("%d", &i);//输入一个字符或字符串的时候死循环 printf("%d\n", i); } 以上直接返回一串0........死循环 当scanf输入类型不匹配的时候,返回一个0值,但是之前输入的字符仍旧在缓冲区里面,所以解决方式也比较容易,在代码中加入ffl…