1 创建一个数组 int a[10]; 2 for循环给数组赋值 for(int i=0;i<10;i++){ scanf("%d",&a[i]); } 3 输入示例 2 4 1 3 5 7 8 9 6 10 (然后回车即可)