fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main() {
  6. double x, y, MEDIA;
  7. cin >> fixed >> setprecision(1);
  8. cin >> x >> y;
  9. MEDIA = ((x * 3.5) + (y * 7.5)) / (3.5 + 7.5);
  10. cout << fixed << setprecision(5);
  11. cout << "MEDIA = " << MEDIA << endl;
  12. return 0;
  13. }
Success #stdin #stdout 0s 3476KB
stdin
5.0
7.1
stdout
MEDIA = 6.43182