#include"malloc.h"
#include<iostream.h>
void main()
{
float *a,*b,*c,*i;
a=(float*)malloc(sizeof(float));
b=(float*)malloc(sizeof(float));
c=(float*)malloc(sizeof(float));
cout<<"请输入三个实数"<<endl;
cout<<"第一个实数:"<<endl;
cin>>*a;
cout<<"第二个实数:"<<endl;
cin>>*b;
cout<<"第三个实数:"<<endl;
cin>>*c;
if(*a>*b)
{
i=a;
a=b;
b=i;
}
if(*a>*c)
{
i=a;
a=c;
c=i;
}
if(*b>*c)
{
i=b;
b=c;
c=i;
}
cout<<"排序后:"<<endl;
cout<<*a<<endl;
cout<<*b<<endl;
cout<<*c<<endl;
}