标签:输出 c语言 div scan can bsp std return turn
输入两数, 从小到大输出:
核心代码:
1 // 输入两数,从小到大输出 2 double a,b,temp; 3 scanf("%lf %lf", &a,&b); 4 if (a > b) { 5 temp = a; 6 a = b; 7 b = temp; 8 } 9 printf("%lf, %lf", a, b);
全部代码:
1 #include<stdio.h> 2 3 int main() { 4 // 输入两数,从小到大输出 5 double a,b,temp; 6 scanf("%lf %lf", &a,&b); 7 if (a > b) { 8 temp = a; 9 a = b; 10 b = temp; 11 } 12 printf("%lf, %lf", a, b); 13 return 0; 14 }
标签:输出 c语言 div scan can bsp std return turn
原文地址:https://www.cnblogs.com/m-yb/p/11503584.html