Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
455 B
0
Indexable
#include <SFML/Graphics.hpp>
#include <iostream>
#include <sstream>
#include <time.h>
#include <Windows.h>
#include <fstream>

using namespace std;
using namespace sf;

float S(float a, float b) {
	return 4 * (3, 14 * a * b + (a - b) * (a - b)) / (a + b);
}

int main()
{
	float a, b, c,s;
	ifstream file("input.txt");
	file >>  c;
	for (int i = 0; i < c; i++)
	{
		file >> a >> b;
		s = S(a, b);
		cout << s << endl;
	}
	
	
}