编程题:两个数比较大小,之后用变量t互换。
#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互换。
#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);
}
流程图: