比较两个数的大小,并从大到小进行排序
#include<stdio.h>int main(){ float a, b, t; scanf("%f%f", &a, &b); if (a>b) { t = b; //如果a大于b则进行交换 b = a; a = t; } printf("%f %f", a, b);
return 0;}
C语言程序设计-谭浩强
原文:https://www.cnblogs.com/old-horse/p/12468767.html