c练习题

1380阅读 0评论2014-12-01 cmq1010950233
分类:C/C++


点击(此处)折叠或打开

  1. #include <stdio.h>
  2. #include<math.h>
  3. int main()
  4. {
  5.      float a,b;
  6.     scanf("%f",&b);
  7.     a=sqrt(b);
  8.     if(b<1000)
  9.     {
  10.     printf("%f\n",a);
  11.     return 0;
  12.     }
  13.     else if(b>=1000)
  14.     printf("输入错误\n");
  15.     return 0;
  16. }

上一篇:c 小题
下一篇:用while写的乘法表