第二章作业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;
}
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;
}
相关文章推荐
- 第二章作业2.30
- 鸟哥的Linux私房菜(基础篇)-第二章、 Linux 如何学习(二.3. 有心朝Linux作业系统学习者的学习态度)
- 第二章作业题51.3(编写一个程序从键盘输入10个数,要求输出其中最小的。)
- 第二章实验作业
- C++第二章作业
- 李红霞作业第二章52页22题
- 数据库原理第二章作业
- 课程作业第二章2-6
- 利用python编写设计多线程web服务器(计算机网络_自顶向下第六版_第二章1和4的编程作业)
- 第二章作业51.4(编写一个程序,判断用户输入的字符是否为数字,若是数字,则输出“a numerical charater”,否则输出“other charater”。)
- 第二章实验作业
- 李红霞作业第二章14题
- 预科 第二章 作业
- [置顶] CSAPP第二章家庭作业参考答案
- 【软件测试】操作系统篇:第二章 作业管理
- 软件工程 第二章作业
- 第二章linux历史 作业
- 第二章作业51.6(输出1000年(包括1000年)到1999年之间的所有闰年,要求每三个一行,分行输出。)
- 第二章作业2.29
- 第二章作业