清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
int times(int searchNum, int arr[], int length) // length 是数组元素个数,searchNum是要查找的值 { int num = (arr[length - 1] == searchNum) ? 1 : 0; if(length > 0) { return num + times(searchNum, arr, length - 1); } return 0; } //或 int get_count( int array[] , int length , int num ){ if( length ) return (num==*array) + get_count( ++array , --length , num); return 0; }