简单的编程

来源:百度知道 编辑:UC知道 时间:2024/05/27 20:46:41
用C++程序编写
定义三个数 a=9, b=7,c=18
然后比较a,b,c大小
输出最大数。
无聊的废话的滚!

#include<iostream>
int main()
{
int max(int a,int b);
int a=9,b=7,c=18;
cout<<max(max(a,b),c)<<endl;
return 0;
}
int max(int a,int b)
{
if(a>b) return a;
else return b;
}
有问题联系QQ 22092513
blog http://pir711.blogcn.com

自己看书去,书上有答案,把书看完再来提问,不回答没水平的问题

好生硬的语气