解题思路:
注意事项:
参考代码:
#include <iostream>
#include <algorithm>
using namespace std;
int main ()
{
int a;
while(scanf("%d",&a) == 1){
int *p=new int [a];
for(int j=0;j<a;j++){
scanf("%d",p+j);
}
sort(p,p+a,greater<int>());
for(int i=0;i<a;i++){
printf("%d ",*(p+i));
}
printf("\n");
}
return 0;
}
0.0分
2 人评分
三进制小数 (C语言代码)浏览:1026 |
【蟠桃记】 (C++代码)(递归计算)浏览:976 |
C二级辅导-等差数列 (C语言代码)浏览:591 |
永远的丰碑 (C语言代码)浏览:656 |
2003年秋浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:698 |
【绝对值排序】 (C语言代码)浏览:717 |
C语言程序设计教程(第三版)课后习题10.1 (Java代码)浏览:1447 |
【亲和数】 (C语言代码)浏览:860 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:900 |
WU-判定字符位置 (C++代码)浏览:1408 |