#include<stdio.h>
void main()
{
float x,y,t;
scanf("%f,%f",&x,&y);
if(x<y)
{t=x;x=y;y=t;}
printf("%6.2f,%6.2f\n",x,y);
}
流程图:
编程题:两个数比较大小,之后用变量t互换。,布布扣,bubuko.com
时间: 2024-10-26 19:36:35
#include<stdio.h>
void main()
{
float x,y,t;
scanf("%f,%f",&x,&y);
if(x<y)
{t=x;x=y;y=t;}
printf("%6.2f,%6.2f\n",x,y);
}
流程图:
编程题:两个数比较大小,之后用变量t互换。,布布扣,bubuko.com