Advertisement
Spocoman

Change Tiles

Oct 10th, 2023
972
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     int areaSide;
  7.     cin >> areaSide;
  8.  
  9.     double tileWidth, tileLength;
  10.     cin >> tileWidth >> tileLength;
  11.  
  12.     int benchWidth, benchLength;
  13.     cin >> benchWidth >> benchLength;
  14.  
  15.     int area = areaSide * areaSide - benchLength * benchWidth;
  16.     double tileArea = tileWidth * tileLength;
  17.     double tiles = area / tileArea;
  18.     double time = tiles * 0.2;
  19.  
  20.     cout << tiles << endl << time << endl;
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement