Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- struct distance1{
- int meter;
- int centimeter; };
- struct Volume {
- distance1 length;
- distance1 width;
- distance1 height; };
- int main()
- {
- Volume volume;
- cout << "Enter parameters"<< '\n' << "Length: ";
- cin >> volume.length.meter;
- cin >> volume.length.centimeter;
- cout << "Width ";
- cin >> volume.width.meter;
- cin >> volume.width.centimeter;
- cout << "Height ";
- cin >> volume.height.meter;
- cin >> volume.height.centimeter;
- float Volume;
- Volume = (volume.length.meter + volume.length.centimeter) * (volume.width.meter + volume.width.centimeter) * (volume.height.meter + volume.height.centimeter);
- cout <<"Your room volume: "<< Volume;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment