sort的用法有那些?

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/29 23:41:09
sort的用法有那些?

sort的用法有那些?
sort的用法有那些?

sort的用法有那些?
sort
sort
[sɒrt; sɒ:t]
《源自拉丁文“命运”的意思》
可数名词
1 种类 (kind) [of]
this of house=a house of this
这种房屋
these s of trees=trees of these s
这些种类的树木
problems of this = (
口语)these of problems这种 [这些] 问题
all s and conditions of men
各式各样的人,各种类型的人
That's the of thing I want.
那就是我所要的东西
What of (a) book do you want?.
你要哪一种书?
2 (口语) (…的) 人,东西
He is a good [bad]~.
他是个好[坏]人
He is not my .
他不是我喜欢的那一型的人
It takes all s (to make a world).
世界上有各种各样的人 [世界上人形形式式无奇不有]
(所以不要见怪)
3‘印刷’某类型的一套铅字
after a sort
有些,有几分,稍为
a sort of
一种…,可以说是…的东西[人]
a of politician
可以说是政治家的人,像政治家那一类的人
in a sort = after a sort
of sorts = of a sort
蹩脚的,较差的
out of sorts(口语)
(1) 不舒服的,没精神的
(2) 心情不好的,闹脾气的
sort of
(口语)有些,有几分,有点,稍微
He was of angry.
他有些生气了
The building of tilted.
那栋建筑物有点倾斜
及物动词
把…加以分类; 拣
these cards according to their colors.
按颜色将这些卡片分类
sort out
(1) → v.t
(2) 把…[从…中]分开,挑出[from]
out the sheep from the goats
分开山羊和绵羊(区别善人与恶人)
She ed out her summer clothes.
她挑出夏季衣服
(3) 归纳; 改善
(4)(英口语)整理,整顿; 解决
(5)(英俚)严惩 [干掉]

排序用的函数
#include
#include
using namespace std;
int main()
{ int a[100],i,n;
scanf("%d",&n);
for(i=0;i scanf("%d",&a[i]);
sort(a,a+n);
for(i=0;i printf("%d ",a[i]);
printf("\n"); return 0;
}