Untitled
#include <iostream> #include <string> #include <fstream> #include <iomanip> using namespace std; int main() { float a, b, s, L; ifstream in("input.txt"); ofstream out("output.txt"); in >> s; for (int i = 0; i < s; i++) { in >> a >> b; L = 4 * (3.1415 * a * b + (a - b) * (a - b)) / (a + b); cout << L << endl; } }