如何用冒泡法对10个数从大到小排序?答:用冒泡法对10个数从大到小排序如下:def bubble_sort(nums):for i in range(len(nums)):for j in range(len(nums)-1):if nums[j]<nums[j+1]:nums[j],nums[j+1]=nums[j+1],nums[j]return numsnums=[34,2,10,-9,89,76,17,-23,55,48]#可以替换为任何10个数的列sorted_nums...
用C语言,随机输入10个整数,用冒泡排序法对这些整数进行从小到大排序...答:int b[10]={9,10,11,12,1,2,3,4,0,1};int c[10]={1,2,3,4,13,14,15,16,2,3};int i;printf("请输入待排序的10个数:");for(i=0;i<10;i++){ scanf("%d",&a[i]);} fun(a);printf("\n排序后的数列如下:\n");for(i=0;i<10;i++){ printf("%2d ",a[i...