- 博客(1)
- 收藏
- 关注
原创 C语言-冒泡排序
#include<stdio.h>void BubbleSort(int A[],int n){ int i,j; for(i=0;i<n-1;i++){ for(j=i+1;j<n;j++){ if(A[i]>A[j]){ int temp; temp=A[j]; A[j]=A[i]; A[i]=temp; } } }}int main(){ int A[5]={3,2,1,4,5}; BubbleSort(
2021-08-01 18:37:02 77
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人