求平方根
描述
输入 1 个实数x,计算并输出其平方根(保留1 位小数)
输出浮点数,并保留一位
可调用头文件中的函数
输入
输入一个实数x
输出
输出平方根
输入样例 1
17
输出样例 1
The square root of 17.0 is 4.1
#include <stdio.h>
#include <stdlib.h>
#include <math.h> //调用此头文件中的函数
int main()
{
float a;
while(~scanf("%f",&a))
printf("The square root of %0.1f is %0.1f\n",a,sqrt(a));
return 0;
}