吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 8699|回复: 6
收起左侧

【c++基础】计算长方体的体积

[复制链接]
zzp139 发表于 2008-8-5 11:56
来源:http://www.eviler.cn
QUOTE:
#include <iostream.h>
//默认参数的用法
//计算长方体的体积

inline int Volume (int length=1,int width=1,int height=1)
{return length * width * height;}
main()
{
cout<<"the default box volume is:"
<< Volume()
<<"\n\nThe volume of a box with kenghe 10,\n"
<<"width 1 and height 1 is:"
<< Volume(10)
<<"\n\nThe volume of a box with kenghe 10,\n"
<<"width 5 and height 1 is:"
<< Volume(10,5)
<<"\n\nThe volume of a box with kenghe 10,\n"
<<"width 5 and height 2 is:"
<< Volume(10,5,2)
<<&#39;\n&#39;;
return 0;
}
dsg.jpg

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

302690561 发表于 2008-8-5 18:22
[s:17][s:17]有什么用?????????
i249142260 发表于 2008-8-6 03:02
yf8821008yf 发表于 2008-8-6 10:36
qq513701092 发表于 2008-8-7 13:38
这```````````````
看不懂..........
哭ゞ著說後悔 发表于 2008-8-10 12:01
难道这就是天文.... [s:38]
看不懂啊! [s:38]
maokecheng 该用户已被删除
maokecheng 发表于 2008-8-14 16:06
提示: 作者被禁止或删除 内容自动屏蔽
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止灌水或回复与主题无关内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-16 20:26

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表