Advertisement
DidiMilikina

01.Birthday

Oct 8th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include  <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int length;
  8.     int width;
  9.     int height;
  10.     double percents_input;
  11.  
  12.     cin >> length >> width >> height >> percents_input;
  13.  
  14.     int volume = length * width * height;
  15.     double liters = volume * 0.001;
  16.     double percents = percents_input * 0.01;
  17.     double total_liters = liters * (1 - percents);
  18.  
  19.     cout << fixed << setprecision(3) << total_liters << endl;
  20.  
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement