为什么这个scanf返回false?

gam*_*boy 0 c c++

此scanf应始终返回true,直到我输入无数字输入,但此scanf从不执行循环.为什么?

样本输入:

10.0 5.0
Press [Enter] to close the terminal ...
Run Code Online (Sandbox Code Playgroud)

码:

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char** argv)
{
    float a, b;
    while ( scanf("%f %f", &a, &b) == 1 )
    {
        printf("%f\n", (a - b) / (a * b));
    }
    return (EXIT_SUCCESS);
}
Run Code Online (Sandbox Code Playgroud)

Ric*_*dle 7

scanf 返回读取的项目数,在本例中为2.