从键盘输入x的值,根据以下公式计算并输出x和y的值。 #include%<math.h> #include<stdio.h> main() {float x,y; scanf("%f".______);/*第

admin2008-07-10  24

问题 从键盘输入x的值,根据以下公式计算并输出x和y的值。
  
   #include%<math.h>
   #include<stdio.h>
   main()
   {float x,y;
   scanf("%f".______);/*第一空*/
   if(x<0)printf("input error!\n");
   else
   {switch((int)(x/2))
   {case 0:y—x;______;/*第二空*/
   case 1:
   case 2:y=x*x+1;break;
   case 3:
   case 4:y=______;break;/*第三空*/
   default:y=1/(x*x+1);
   }
   printf("x=%7.2f,y=%10.6f\n",x,y);
   }
   }

选项

答案&x break sqrt(x+1)

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

最新回复(0)