1 Star 1 Fork 4

懒羊羊 / Algorithm-note

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
10.2.c 282 Bytes
一键复制 编辑 原始数据 按行查看 历史
懒羊羊 提交于 2020-01-14 16:40 . C源码
#include <stdio.h>
void swap(int* a,int* b){
int temp=*a;
*a=*b;
*b=temp;
}
int main(){
int a,b,c,*p1=&a,*p2=&b,*p3=&c;
scanf("%d %d %d",&a,&b,&c);
if(a<b) swap(p1,p2);
if(a<c) swap(p1,p3);
if(b<c) swap(p2,p3);
swap(p1,p3);
printf("%d %d %d\n",*p3,*p2,*p1);
return 0;
}
C
1
https://gitee.com/yang365/Algorithm-note.git
git@gitee.com:yang365/Algorithm-note.git
yang365
Algorithm-note
Algorithm-note
master

搜索帮助