题解 | #KiKi算期末成绩#
KiKi算期末成绩
http://www.nowcoder.com/practice/4ef07b4f80fc4027a4b90e2245f8f637
int main(){
int grade[4] = {0};
int i = 0;
float finalgrade = 0;
for (i = 0;i < 4;i++)
scanf("%d ",&grade[i]);//输入成绩并存储在数组中
finalgrade = grade[0]*0.2f + grade[1]*0.1f + grade[2]*0.2f + grade[3]*0.5f;
printf("%.1f",finalgrade);
return 0;
}