有代码和运行后的图片,麻烦看下,好久了都没解决
#include <stdio.h>
void main()
{
int i,j;
float temp;
float num[3];
for(i = 0;i < 3;i++)
{
scanf("%f",&num[i]);
}
for(i = 0;i < 3;i++)
{
for(j = 0;j<3;j++)
{
if(num[j]>num[j+1])
{
temp = num[j];
num[j] = num[j+1];
num[j+1] = temp;
}
}
}
printf("%.2f %.2f %.2f\n",num[0],num[1],num[2]);
}
![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/429623107436132.png "=600 #left")