diff --git a/冒泡排序 b/冒泡排序 new file mode 100644 index 0000000..e2d61da --- /dev/null +++ b/冒泡排序 @@ -0,0 +1,34 @@ +//冒泡排序 +#include +void bubbleSort(int a[],int n) +{ + int temp; + for(int i=0;ia[j+1]) + { + temp=a[j]; + a[j]=a[j+1]; + a[j+1]=temp; + } + } + } +} +int main() +{ + int a[1000]; + int n; + scanf("%d",&n); + for(int i=0;i