AcWing 661. 平均数3
原题链接
简单
作者:
jaemin
,
2025-01-05 22:18:06
,
所有人可见
,
阅读 1
#include <cstdio>
#include <iostream>
//#include <cmath>
using namespace std;
int main()
{
double a,b,c,d,mid,z,y;
cin>>a>>b>>c>>d;
mid=(a*2+b*3+c*4+d*1)/10;
printf("Media: %.1lf\n",mid);
if(mid>=7) cout<<"Aluno aprovado."<<endl;
else if(mid<5) cout<<"Aluno reprovado."<<endl;
else
{
cout<<"Aluno em exame."<<endl;
cin>>y;
printf("Nota do exame: %.1lf\n",y);
z=(mid+y)/2;
if(z>=5) cout<<"Aluno aprovado."<<endl;
else cout<<"Aluno reprovado."<<endl;
printf("Media final: %.1lf\n",z);
}
return 0;
}