Advertisement
DidiMilikina

Задача 01 - Зеленчукова борса

Sep 18th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. #include <iomanip>
  4. using namespace std;
  5.  
  6. int main() {
  7.     double kg_veg;
  8.     double kg_fruits;
  9.     double total_veg;
  10.     double total_fruits;
  11.  
  12.     cin >> kg_veg >> kg_fruits >> total_veg >> total_fruits;
  13.  
  14.     double value_veg = kg_veg * total_veg;
  15.     double value_fr = kg_fruits * total_fruits;
  16.     double total_sum = value_veg + value_fr;
  17.  
  18.     cout << fixed << setprecision(2) << total_sum / 1.94 << endl;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement