Untitled
unknown
plain_text
2 years ago
419 B
1
Indexable
Never
#include <iostream> #include <string> #include <math.h> #include <fstream> using namespace std; float aaaa(int a, int b) { return 4 * ((3.14 * a * b + (a - b) * (a - b)) / (a + b)); }; int main() { int n, a, b; float P; ifstream jija("input.txt"); jija >> n; for (int i = 0; i < n; i++) { jija >> a >> b; P = aaaa(a, b); cout << P << endl; } }