首页 > 编程语言 > 详细

c++入门02

时间:2016-06-18 01:26:02      阅读:103      评论:0      收藏:0      [点我收藏+]

#include "stdio.h"
#include "iostream"

void main02(){
int max(const int &x,const int &y);
int x,y;
std::cin>>x>>y;
int v=max(x,y);
std::cout<<"较大数为:"<<v<<std::endl;
}

int max(const int&x,const int&y){
//x=7;//由于const修饰所以x值不可改
return (x>y)?x:y;
}

c++入门02

原文:http://www.cnblogs.com/wangshuile/p/5595494.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!