Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- double x, y, h;
- cin >> x >> y >> h;
- double green = x * y * 2 - (1.5 * 1.5 * 2) + x * x * 2 - 1.2 * 2;
- double red = 2 * x * y + 2 * x * h / 2;
- cout.setf(ios::fixed);
- cout.precision(2);
- cout << green / 3.4 << endl;
- cout << red / 4.3 << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement