学生分数操作(Student score manipulation).docVIP

  • 7
  • 0
  • 约6.33千字
  • 约 13页
  • 2017-10-07 发布于河南
  • 举报

学生分数操作(Student score manipulation).doc

学生分数操作(Student score manipulation)

学生分数操作(Student score manipulation) 1. m personal results stored in the score array, please write the function fun, its function is: lower than the average number of people as a function value returned, will be below the average score placed in the below refers to the array. For example, when the data in the score array is 10, 20, 30, 40, 50, 60, 70, 80, 40, and 90, the number of functions returned should be 4, and the data in below should be 10, 20, 30, and two. The first for total circulation is used to calculate the fraction of score in the array, and then use aver/=m to calculate the average value of second cycles to find less than the average points and elements in the array below, here we should pay attention to increasing J. Fill in the blanks (1), if (n=len), strcpy (J); (2) t[j++]=0; (3) t[j]= i++; Error (1) for (I = 2; I =m; i++) (2) y = 1 / (I * I); Int, I, j=0, aver=0; For (i=0; im; i++) aver+=score[i]; aver/=m; For (i=0; im; i++) If (score[i]aver) below[j++]=score[i]; Return j; 2. known student records are made up of student numbers and academic records, and data for N students has been stored in an array of a structures. Please write the function fun, which functions to find the highest record of students and return the main function through the parameter (with only one of the highest scores). The head of the function has been given. Complete the function. Fill in the blanks STU fun (STU, *std, char, *num) If (StrCmp (std[i].num, Num) ==0) Return (std[i]); Error correction IsPrime (int, n) If ((n%i)) Int i; *s=a[0]; For (i=1; iN; i++) if (a[i].s (*s).S) *s=a[i]; 3., please write a function fun, its function is: to calculate the average N gate course, the results of the calculation as a function value returned. For example, if the result of 5 courses is: 90.5,72,80,61.5,55, the function value is 71.80. Fill in the blanks (1) x (2) P (3) s Error (1) long k=1; (2) num/=10; Float av=0.0; int i; For (i=0; in; i++) av=av+a[i]; Return (av/n); The results of 4.

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档