C语言
8.编写程序,输入一正实数,输出它的平方根。#include<stdio.h>
int main()
{
int a;
double b;
printf("请输入一个正整数:");
scanf("%d",&a);
b=sqrt(a);
printf("它的平方根是:%d",&b);
return 0;
}
G:\新建文件夹\第八题.cpp(8) : error C2065: 'sqrt' : undeclared identifier
https://baike.so.com/doc/6341242-6554858.html 加入头文件
#include <math.h>
页:
[1]