第一章11
来源:互联网 发布:想开淘宝没有货 编辑:程序博客网 时间:2024/06/05 00:08
#include<iostream>
using namespace std;
int max(int a,int b,int c=0)
{
int max=0;
max=max>a?max:a;
max=max>b?max:b;
max=max>c?max:c;
return max;
}
int main()
{
int a,b,c;
cin>>a>>b>>c;
cout<<("max(a,b,c)=")<<max(a,b,c)<<endl; //输出3个数中的最大数
cout<<("max(a,b)=")<<max(a,b)<<endl; //输出两个数中的最大数
return 0;
}
using namespace std;
int max(int a,int b,int c=0)
{
int max=0;
max=max>a?max:a;
max=max>b?max:b;
max=max>c?max:c;
return max;
}
int main()
{
int a,b,c;
cin>>a>>b>>c;
cout<<("max(a,b,c)=")<<max(a,b,c)<<endl; //输出3个数中的最大数
cout<<("max(a,b)=")<<max(a,b)<<endl; //输出两个数中的最大数
return 0;
}
0 0
- 第一章11
- 第一章第11题
- 第一章>
- 第一章
- 第一章
- 第一章
- 第一章
- 第一章
- 第一章
- 第一章
- 第一章
- 第一章
- 第一章
- 第一章
- 第一章
- 第一章
- 第一章
- 第一章
- USACO 2.2 Party Lamps
- ROC和AUC介绍以及如何计算AUC
- poi到处数据 使用反射机制 动态取字段数据
- 利用IntelliJ IDEA与Maven开始你的Scala之旅
- 出现错误“tcnative-1.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform”的解决办法
- 第一章11
- resin容器发布的jsp项目在访问时,提示Check that you are using the JDK, not the JRE.
- TensorBoard tf.summary.merge_all() AttributeError: 'NoneType' object has no attribute 'bucket 错误
- 解解request乱码问题
- Android微信开发的应用签名
- 欢迎使用CSDN-markdown编辑器
- Log4j级别
- popupWindow弹框
- Https的安全性