///
include [HTML_REMOVED]
include [HTML_REMOVED]
include [HTML_REMOVED]
using namespace std;
int main()
{
double a, b, c, d, y;
cin >> a >> b >> c >> d >> y;
if (((2 * a + 3 * b + 4 * c + d) / 10) >= 7)
printf(“Media: %.1lf\nAluno aprovado.”, (2 * a + 3 * b + 4 * c + d) / 10);
if ((2.0 * a + 3.0 * b + 4.0 * c + d) / 10.0 < 5.0)
printf (“Media: %.1lf\nAluno reprovado.”, round(2.0 * a + 3.0 * b + 4.0 * c + d) / 10.0);
if (((2 * a + 3 * b + 4 * c + d) / 10) >= 5 && ((2 * a + 3 * b + 4 * c + d) / 10) <= 7)
{
printf(“Media: %.1lf\nAluno em exame.\nNota do exame: %.1lf\n”, (2 * a + 3 * b + 4 * c + d) / 10, y);
if (((((2 * a + 3 * b + 4 * c + d) / 10) + y) / 2) >= 5)
printf(“Aluno aprovado.\nMedia final: %.1lf”, (((2 * a + 3 * b + 4 * c + d) / 10) + y) / 2);
if (((((2 * a + 3 * b + 4 * c + d) / 10) + y) / 2) < 5)
printf(“Aluno reprovado.\nMedia final: %.1lf”, (((2 * a + 3 * b + 4 * c + d) / 10) + y) / 2);
}
return 0;
}
///
主要问题还是在平均数和第三个情况中,多加入了一个浮点数