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

11 lines
184 B
C++
Raw Permalink Normal View History

2023-03-23 23:11:06 +08:00
#include <iostream>
using namespace std;
int main()
{
float a, b, w = 3.5 + 7.5;
scanf("%f%f", &a, &b);
printf("MEDIA = %.5f", a * 3.5 / w + b * 7.5 / w);
return 0;
}