用冒泡排序法将数组a[10]={1,3,2,5,6,7,4,9,10,8}中的数进行从大到小...答:include<stdio.h> int main(){ int a[10]={1,3,2,5,6,7,4,9,10,8},i,j,t ;for(i=1;i<=9;i++)for(j=0;j<9;j++)if(a[j]<a[j+1]){ t=a[j];a[j]=a[j+1];a[j+1]=t ;} for(i=0;i<10;i++)printf("%d\n",a[i]);return 0;} ...
对包含10个元素的数组A进行升序排序,输出结果(冒泡排序)答:下面是用c语言写的,可以参考一下:// demo.cpp#include <stdio.h>#include <stdlib.h>int main(){int A[] = { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 };for (int i = 0; i < 10 - 1; i++) {for (int j = 0; j < 10 - i - 1; j++) {if (A[j] > A[j ...