Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- namespace box{
- float side1, side2, side3;
- void calculateVolume(){
- cout << setw(15) << setprecision(5) << fixed << side1*side2*side3 << endl;
- }
- }
- namespace{
- void maxSide(){
- cout << setw(15) << setprecision(5) << max(box::side1, max(box::side2, box::side3)) << endl;
- }
- void minSide(){
- cout << setw(15) << setprecision(5) << min(box::side1, min(box::side2, box::side3)) << endl;
- }
- }
- int main(){
- while(1){
- cin >> box::side1 >> box::side2 >> box::side3;
- box::calculateVolume();
- maxSide();
- minSide();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement