C++编程题:输入3个整型数,按由大到小的顺序输出显示!
C++编程题:输入3个整型数,按由大到小的顺序输出显示!
日期:2009-03-03 22:00:57 人气:3
#include
#include
#include
using namespace std;
int main()
{
cout<<"Plese input three int numbers:"<<endl;
vector int_vec;
int n;
while(cin>>n)
{
int_vec.push_back(n);
}
sort(int_vec.begin(),int_vec.en