/* 编写一个程序,要求输入两个浮点数,然后打印出用二者的差值除以二者的乘积所得的结果。在用户非数字的输入之前程序循环处理输入值。 */ #include <stdio.h> int main (void) { float x,y; printf("Please input two float./n"); while(2 == scanf("%f%f",&x,&y)) { printf("(max_float - min_float) / (max_float * min_float) = %f/n", ((x > y)?(x - y):(y - x)) / ( x * y) ); } system("pause"); return 0; }