2.30

来源:互联网 发布:网络上gp是什么意思 编辑:程序博客网 时间:2024/05/16 05:48

#include<iostream>
#include<math.h>
using namespace std;
int sroot(int i)
{return sqrt(i);
}
long sroot(long l);
{return sqrt(l);
}
double sroot(double d)
{return sqrt(d);
}
int main()
{
 int i=13;
 long l=1234;
 double d=1.23;
 cout<<i<<"的二次方根为:"<<sroot(i)<<endl;
 cout<<l<<"的二次方根为:"<<sroot(l)<<endl;
 cout<<d<<"的二次方根为:"<<sroot(d)<<endl;
 return 0;
}
0 0
原创粉丝点击