mirror of
https://github.com/renbaoshuo/202401-programming-assignments.git
synced 2024-12-16 15:44:39 +00:00
48 lines
1.1 KiB
Markdown
48 lines
1.1 KiB
Markdown
# 6-3 综合成绩
|
|
|
|
小明的公司为了招聘新员工设计了一套考试方案。从表达能力、逻辑能力、人文素质、科学素质、计算思维5个方面进行考察。综合成绩 = 表达能力*0.4+逻辑能力*0.5+人文素质*0.3+科学素质*0.6+计算思维*0.8。要求定义一个计算综合成绩的函数。
|
|
|
|
|
|
|
|
### 函数接口定义:
|
|
```c
|
|
double getAverage(Applicant *a);
|
|
```
|
|
|
|
a中存放一个应聘者的考试成绩。要求返回综合成绩。
|
|
|
|
### 裁判测试程序样例:
|
|
```c
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
typedef struct{
|
|
int presentation;
|
|
int logical;
|
|
int humanistic;
|
|
int scientific;
|
|
int computational;
|
|
}Applicant;
|
|
double getAverage(Applicant* a);
|
|
int main()
|
|
{
|
|
Applicant a;
|
|
double overall;
|
|
scanf("%d%d%d%d%d", &a.presentation,&a.logical,&a.humanistic,&a.scientific,&a.computational);
|
|
overall = getAverage(&a);
|
|
printf("%.2f\n",overall);
|
|
return 0;
|
|
}
|
|
|
|
/* 您提交的代码将放置在这里 */
|
|
```
|
|
|
|
### 输入样例:
|
|
```in
|
|
100 100 100 100 100
|
|
```
|
|
|
|
### 输出样例:
|
|
```out
|
|
260.00
|
|
```
|