您的位置:首页 > 其它

第二章作业2.30

2015-04-01 16:18 260 查看
# include <iostream>

using namespace std;

int sroot(int x)

{
return x*x;}

long sroot(long y)

{

    return y*y;}

double sroot(double z)

{
return z*z;}

int main()

{
int x=2;
long y=1628;
double z=3.14;
cout<<x<<"*"<<x<<"="<<sroot(x)<<endl;

    cout<<y<<"*"<<y<<"="<<sroot(y)<<endl;

    cout<<z<<"*"<<z<<"="<<sroot(z)<<endl;
return 0;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: