第二章作业2.30
2015-04-01 17:16
155 查看
#include<iostream> #include<cmath> using namespace std; int sroot(int a) { return sqrt(a); } long sroot(long b) { return sqrt(b); } double sroot(double c) { return sqrt(c); } int main() { int a=9; long b=4566; double c=62.41; cout<<a<<"的二次方根为:"<<sroot(a)<<endl; cout<<b<<"的二次方根为:"<<sroot(b)<<endl; cout<<c<<"的二次方根为:"<<sroot(c)<<endl; return 0; }
相关文章推荐
- 第二章作业2.30
- 第二章作业例题与要求完成作业
- 第二章作业P51.16(输入三个整数a,b,c,请按从小到大的顺序输出。)
- Linux第二章作业
- 操作系统第二章作业
- 第二章顺序表视频中的作业
- 《Java数据结构和算法》第二版 Robert lafore 编程作业 第二章
- 作业2.30
- 第二章作业,学生类
- 第二章作业
- 第二章作业P51.20(设某县2000年工业总产值为200亿元,如果该县预计平均年工业总产值增长率为0.045%,那么多少年后该县年工业生产总值将超过500亿?)
- 第二章作业题2
- 第二章 C++的初步认识作业
- 《高级编程技术》作业[2]——第二章部分习题选做
- 作业2.30
- Linux第二章作业
- 第二章作业题3-链表(2)
- 《Java数据结构和算法》第二版 Robert lafore 编程作业 第二章
- 2015.3.27课堂作业 第二章第8题
- 第二单元作业 2.30