현재 위치 - 주공해몽공식사이트 - 관음보살의 랜덤 번호 뽑기 - C 언어 고수가 들어와서 작은 프로그램을 쓴다.

C 언어 고수가 들어와서 작은 프로그램을 쓴다.

# include # include # includeintscore _ count (int * arr, intarr_size, intscore){inttotal=0 For(I = 0;; Itemp) {temp = arr [I]; }} returntemp} intsearch _ second (int * arr, intarr_size){inttemp=0, I; Intfirst=search_first(arr, arr _ size); For(I = 0;; Itemp) {temp = arr [I]; }} returntemp} intsearch _ third (int * arr, intarr_size){inttemp=0, I; Intfirst, secondfirst=search_first(arr, arr _ size); Second=search_second(arr, arr _ size); For(I = 0;; Itemp) {temp = arr [I]; }} return temp} voidsearch _ level (int * arr, intarr_size){inti, 우수 =0, 양호 =0, 중간 =; For(I = 0;; I = 90){ 우수++; } elseif (arr [I] = 75) {well++; } elseif (arr [I] > = 60&& arr [I] = 3):; Scanf("%d ",& 합계); If (합계<3) 합계 = 3; Score = (int *) malloc (sizeof (int) * total); For(I = 0;; 나< 합계; I++){printf ("학생 %d 의 점수를 입력하십시오:", I+1); Scanf("%d ",& ampscore [I]); }first=search_first (점수, 합계); Second=search_second (점수, 합계); Third=search_third (점수, 합계); Printf ("최고 성적: \ n"); Printf("%d 점수: %d 사람 \ n ",first, score _ count (score, total, first));); Printf("%d score: %d people \ n ",초, score _ count (score, total, second));); Printf("%d score: %d people \ n ",셋째, score _ count (score, total, third));); Search_level (점수, 합계); }