#include <cstdio>
#include <algorithm>
using namespace std;
int a[5];
int main()
{
for (int i=0;i<3;i++)
scanf ("%d",&a[i]);
sort(a,a+3);
for (int i=2;i>=0;i--)
printf ("%d ",a[i]);
return 0;
}算法训练 排序
最新推荐文章于 2022-08-04 16:16:52 发布
本文介绍了一个简单的 C++ 程序,该程序通过使用标准库函数 sort 对输入的整数数组进行排序,并按从大到小的顺序输出排序后的数组。此程序展示了 C++ 中数组操作和标准模板库 STL 的基本用法。

300

被折叠的 条评论
为什么被折叠?



