sortï¼ï¼å½æ°æè¿°ï¼å¯¹ç»å®åºé´ææå
ç´ è¿è¡æåºã
sortï¼ï¼å½æ°è¯æ³ï¼sort(begin,end)ï¼è¡¨ç¤ºä¸ä¸ªèå´ã
sortï¼ï¼å½æ°ä¸¾ä¾ï¼
int _tmain(int argc, _TCHAR* argv[])
{
int a[20]={2,4,1,23,5,76,0,43,24,65},i;
for(i=0;i<20;i++)
cout<<a[i]<<endl;
sort(a,a+20);
for(i=0;i<20;i++)
cout<<a[i]<<endl;
return 0;
}
è¾åºç»æå°æ¯ææ°ç»aæååºæåºã
温馨提示:答案为网友推荐,仅供参考