Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
113911 | 胡海峰老师 | 比较三个数大小II | C | Accepted | 0 MS | 200 KB | 952 | 2025-03-16 20:59:32 |
#include <stdio.h> int main(){ int a,b,c,first,third,second; scanf("%d%d%d",&a,&b,&c); if (a > b){ if (a > c){ first = a; } else{ first = c; } } else{ if (b > c){ first = b; } else{ first = c; } } if (a < b){ if (a < c){ third = a; } else{ third = c; } } else{ if (b < c){ third = b; } else{ third = c; } } if (first == a){ if (third == b){ second = c; } if (third == c){ second = b; } } if (first == b){ if (third == a){ second = c; } if (third == c){ second = a; } } if (first == c){ if (third == b){ second = a; } if (third == a){ second = b; } } printf("%d %d %d",third,second,first); return 0; }