Md_Touhid

URI - Problem 1005 - Average 1

Apr 13th, 2020
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include<iostream>
  2. #include<cstdio>  //for printf()
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     float a, b, media;
  9.     cin >> a;
  10.     cin >> b;
  11.  
  12.     media = (a*3.5 + b*7.5) / (3.5+7.5);
  13.  
  14.     printf("MEDIA = %.5f\n", media); //new line for presentation error
  15.  
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment