~cpp #include <iostream> #include <cmath> using namespace std; double length, width; void findMinMax() { if(length<width) cout << (length+width - sqrt(length*length - length*width + width*width))/6.0 << " 0.000 " << length/2.0 << endl; else cout << (length+width - sqrt(length*length - length*width + width*width))/6.0 << " 0.000 " << width/2.0 << endl; } int main() { cout.setf(ios::fixed, ios::floatfield); cout.setf(ios::showpoint); cout.precision(3); while(cin>>length>>width) findMinMax(); return 0; }