Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
343 B
0
Indexable
#include <iostream>
#include <fstream>
using namespace std;
float L(float a, float b) {
	float l;
	l = 4 * ((3.14 * a * b + (a - b) * (a - b)) / (a + b));
	return l;
}
int main()
{
	ifstream in("input.txt");
	int n;
	in >> n;
	for (int i = 0; i < n;i++)
	{
		float a, b;
		in >> a >> b;
		cout << L(a, b) << endl;
	}

}