//#include <iostream>
#include <cstdio>
//using namespace std;
int main()
{
double a,b,c,d;
scanf("%lf%lf%lf%lf",&a,&b,&c,&d);
double avg = (a*2 + b*3 + c*4 + d*1)/(1+2+3+4);
printf("Media: %.1lf\n",avg+0.0000001);//精度处理常用方法
if(avg >= 7)
printf("Aluno aprovado.\n");
else if(avg < 5)
printf("Aluno reprovado.\n");
else
{
printf("Aluno em exame.\n") ;
double y,z;
scanf("%lf",&y);
printf("Nota do exame: %.1lf\n",y);
z = (avg + y)/2;
if(z >= 5)
printf("Aluno aprovado.\n");
else
printf("Aluno reprovado.\n");
printf("Media final: %.1lf",z);
}
return 0;
}
这题主要在精度问题上烦人