Advertisement
DidiMilikina

01. Поправка на плочки

Sep 18th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.73 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. #include <iomanip>
  4. using namespace std;
  5.  
  6. int main() {
  7.     double length_playground;
  8.     double width_plate;
  9.     double length_plate;
  10.     double width_bench;
  11.     double length_bench;
  12.     cin >> length_playground >> width_plate >> length_plate >> width_bench >> length_bench;
  13.  
  14.     double area_playground = length_playground * length_playground;
  15.     double area_bench = width_bench * length_bench;
  16.     area_playground = area_playground - area_bench;
  17.     double area_plate = width_plate * length_plate;
  18.     double count_plates = area_playground / area_plate;
  19.     double needed_time = count_plates * 0.2;
  20.  
  21.     cout << fixed << setprecision(2) << count_plates << endl;
  22.     cout << fixed << setprecision(2) << needed_time << endl;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement