用户:
原带马查看:118 回复:2 评论:6 创建时间:2021-04-19T21:17:13
#include<iostream>
using namespace std;
int main()
{
int a=0;
int s=0;
int cun=0;
int shu = 0;
cout << "数1" << endl;
cin >> a;
cout << "数2" << endl;
cin >> s;
cout<<"数3" << endl;
cin>>shu;
if (a>s)
{
cun = a;
a = s;
s = cun;
}
if (s > shu)
{
cun = s;
s = shu;
shu = cun;
}
if (a > s)
{
cun = a;
a = s;
s = cun;
}
cout << a << s << shu;
}
Alcala这不是人人都会吗?()
点赞0
评论
可不吗
这太麻烦,sort()
重点是对算法的理解。。。而不是结果
数学里有句老话说得好:过程错了,就是错了(我也不知到这句话和帖子有什么关系。。。随便说说而已,止增笑尔,勿喷)
理解了冒泡排序也没什么用吧,要学也学桶排,堆排,喵这些啊。。。
现在还有谁用时间复杂度 O(n^2) 的排序啊