用引用变量作为形参,实现3个整数由小到大输出

[复制链接]
查看11 | 回复0 | 2007-5-9 17:38:12 | 显示全部楼层 |阅读模式
#include using namespace std; void max(int&a,int&b,int&c) { //coutb)?b:a)>c)?c:b; int temp; if(a>b) { temp=b; b=a; a=temp; } if(a>c) { temp=c; c=a; a=temp; } if(b>c) { temp=b; b=c; c=temp; } cout<<a<<'\t'<本回答被提问者采纳
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行