/*
* Copyright (c) 2011, 烟台大学计算机学院
* All rights reserved.
* 作 者:王静
* 完成日期:2012 年12 月21 日
* 版 本 号:v1.0
* 输入描述:
* 问题描述:
* 程序输出:
* 问题分析:
* 算法设计:略
*/
#include <iostream>
using namespace std;
void jiaohuan(int *x, int *y,int *z);
int main(void)
{
int a,b,c;
cin>>a>>b>>c;
jiaohuan(&a, &b,&c);
cout<<"a="<<a<<",b="<<b<<",c="<<c<<endl;
return 0;
}
void jiaohuan(int *x, int *y,int *z)
{
int max,m;
if(*x>*y){
if(*x>*z){
cout<<*x;
if(*z>*y){
cout<<","<<*z<<","<<*y<<endl;
}
}else{
cout<<*z<<","<<*x<<","<<*y<<endl;
}
}else{
if(*y>*z){
cout<<*y;
if(*z>*x){
cout<<","<<*z<<","<<*x<<endl;
}
}else{
cout<<*z<<","<<*y<<","<<*x<<endl;
}
}
}
运行结果:
(贴图)
心得体会: