이야기 ¶
수학문제라 문제만 풀고나니 코딩은 금방 됐다~~
대부분 똑같은 방식으로 풀었으리라 예상하고 설명 안함^^
소스 ¶
~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;
}













