请读程序: # include<stdio.h> main( ) { floa x,y; scanf("%f",& x); if(x<0.0)y=0.0; else if ((x<5.0)& &(x!=2

admin2009-04-15  17

问题 请读程序:    # include<stdio.h>    main(  )    {  floa x,y;      scanf("%f",& x);      if(x<0.0)y=0.0;      else if ((x<5.0)& &(x!=2.0))                y=1.0/(x+2.0);          else if(x<10.0)y=1.0/x;         else y=10.0;     printf("%f\n",y);     }    若运行时从键盘上输入2.0<CR>(<CR>表示回车),则该程序的输出结果是()

选项 A、0
B、0.25
C、0.5
D、1

答案4

解析
转载请注明原文地址:https://kaotiyun.com/show/L4Xp777K
0

随机试题
最新回复(0)