CPP_Basics_Syntax/第一讲 变量、输入输出、表达式与顺序语句/607.cpp

10 lines
169 B
C++
Raw Normal View History

2023-03-30 16:12:36 +08:00
#include <cstdio>
int main()
{
float a, b, c;
scanf("%f%f%f", &a, &b, &c);
printf("MEDIA = %.1f\n", (a * 2 + b * 3 + c * 5) / (2 + 3 + 5));
return 0;
}