摘要:
#include using namespace std; int search(int a[],int low,int high,int n); int main() { int i,low=0,high=9,key; int a[10]={2,3,12,23,24,34,51,61,71,81}; cout>key; search(a,low,high,key); return 0; } i... 阅读全文
摘要:
#include using namespace std; #define n 10 void sort(int a[]); int main() { int a[n]; int i; for(i=0;i>a[i]; } sort(a); for(i=0;ia[j+1]) { min=a[j]; a[j]=a[j+1]; a[j+1]=min; } } } } /*暴力排序 for(i=0;ia... 阅读全文