#include <bits/stdc++.h> using namespace std; int main() { // a存储数组长度 int a; scanf("%d", &a); // 设置整数类型的数组指针,使用数组长度a分配空间大小,不然编译不通过 int *b = (int*) malloc(a*sizeof(int)); // for循环加scanf逐个读取数字存入数组b for (int i = 0; i < a; i++) scanf("%d", &b[i]); // sort函数实现排序,注意传入参数的区间问题 sort(b, b + a...