平均数2

This commit is contained in:
flykhan 2023-03-30 16:12:36 +08:00
parent 937af5fba4
commit cb6e3749ee
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
#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;
}