double n1,n2,n3,n4;
scanf(“%lf %lf %lf %lf”,&n1,&n2,&n3,&n4);
double X =(n12+n23+n34+n41)/10;
printf(“Media: %.1lf\n”,X);
if(X>=7.0)printf(“Aluno aprovado.”);
if(X<5.0)printf(“Aluno reprovado.”);
if(X>=5&&X<7){
printf(“Aluno em exame.\n”);
double Y;
scanf(“%lf”,&Y);
printf(“Nota do exame: %lf\n”,Y);
double Z = (X+Y)/2;
if(Z>=5)
printf(“Aluno aprovado.\n”);
else printf(“Aluno reprovado.\n”);
printf(“Media final: %lf\n”,Z);
}
//写\n记得,和注意题干,在X之后。