| 12 | } |
| 13 | |
| 14 | int main() |
| 15 | { |
| 16 | std::vector boxes {Box {2.0, 2.0, 3.0}, Box {1.0, 3.0, 2.0}, |
| 17 | Box {1.0, 2.0, 1.0}, Box {2.0, 3.0, 3.0}}; |
| 18 | const double minVolume{6.0}; |
| 19 | std::cout << "Objects with volumes less than " << minVolume << " are:\n"; |
| 20 | for (const auto& box : boxes) |
| 21 | if (box < minVolume) show(box); |
| 22 | |
| 23 | std::cout << "Objects with volumes greater than " << minVolume << " are:\n"; |
| 24 | for (const auto& box : boxes) |
| 25 | if (minVolume < box) show(box); |
| 26 | } |