Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // KP53E199
- #include "pch.h"
- #include <iostream>
- using namespace std;
- int main()
- {
- int x, y, z, square, volume;
- cout << "Enter x, y, z: "; cin >> x >> y >> z;
- if (x <= 0 || y <= 0 || z <= 0) cout << "Data is incorrect." << endl;
- else
- {
- square = 2 * x * y + 2 * x * z + 2 * y * z;
- volume = x * y * z;
- cout << "Square = " << square << ", volume = " << volume << endl;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment