Advertisement
Guest User

URI Online Judge | 1006 Average 2

a guest
Apr 10th, 2020
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4. int main()
  5. {
  6.     float A=0;float B=0; float C=0;
  7.     cin>>A;
  8.     cin>>B;
  9.     cin>>C;
  10.     float MEDIA=((A*2)+(B*3)+(C*5))/10;
  11.     cout.setf(ios::fixed,ios::floatfield);
  12.     cout.precision(3);
  13.     cout<<"MEDIA = "<<std::setprecision(1)<<MEDIA<<endl;
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement