注册 登录
编程论坛 C++教室

sqrt()函数有什么用?给个例子

明次 发布于 2009-07-16 21:33, 1059 次点击
如题!
2 回复
#2
hdacer2009-07-16 22:00
就是对一个数开平方的函数
#include<iostream>
#include<cmath>
using namespace std;

int main()
{
    double x;
    while(cin>>x)
    {
        cout<<sqrt(x)<<endl;
    }
    return 0;
}
#3
明次2009-07-17 14:41
哦  谢谢``
1