哪里错了这程序

来源:百度知道 编辑:UC知道 时间:2024/06/09 05:27:45
#include"iostream"
int main()
{
int a,b,c,temp;
cout<<"请输入3个数:"<<endl;
cin>>a>>b>>c;
if (b<c)
{
temp=b;
b=c;
c=temp;
}
if(a<c)
{
temp=a;
a=c;
c=temp;
}
if(a<b)
{
temp=b;
b=a;
a=temp;
}
cout<<"321:"<<a<<b<<c<<endl;
return 0;
}
我要从大到小

#include "stdafx.h"
#include <iostream.h>
int main()
{
int a,b,c,temp;
cout<<"请输入3个数:"<<endl;
cin>>a>>b>>c;
if (b<c)
{
temp=b;
b=c;
c=temp;
}
if(a<c)
{
temp=a;
a=c;
c=temp;
}
if(a<b)
{
temp=b;
b=a;
a=temp;
}
cout<<"321:"<<a<<b<<c<<endl;
return 0;
}

你要干什么?
-----------------

还没学C++