标签:log pre int void style blog code 排序 ++
1 void maopaoAscSort(int arr[], int length) 2 { 3 for(int i = 0; i < length - 1; i++) 4 { 5 for(int j = 0; j < length - i - 1; j++) 6 { 7 if(arr[j] > arr[j + 1]) 8 { 9 arr[j] = arr[j] ^ arr[j + 1]; 10 arr[j + 1] = arr[j] ^ arr[j + 1]; 11 arr[j] = arr[j] ^ arr[j + 1]; 12 } 13 } 14 } 15 }
标签:log pre int void style blog code 排序 ++
原文地址:http://www.cnblogs.com/panda1024/p/6025068.html