三个数升降序排序

3个数升序排序

if (a > b) {double t = a; a = b; b = t;}
if (a > c) {double t = a; a = c; c = t;}
if (b > c) {double t = b; b = c; c = t;}

3个数降序排序

if (a < b) {double t = a; a = b; b = t;}
if (a < c) {double t = a; a = c; c = t;}
if (b < c) {double t = b; b = c; c = t;}

2023-05-01 08:38:17 星期一

posted on 2023-05-01 08:39  逆袭怪  阅读(13)  评论(0编辑  收藏  举报