Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
468 B
0
Indexable
Never
#include <iostream>
#include <fstream>
#include <tuple>
using namespace std;
int y(int b);
int f(int a);
int F1(int a, int b);

int F1(int a, int b) {
	return f(a)* a - y(b) * b;
}
int f(int a) {
	return  a * 2 - 4 * a;
}
int y(int b) {
	return (-8 * b) + 4;
}

int main() {
	ifstream in("func.txt");
	ofstream out("result.txt");
	int a;
	in >> a;
	for (int i = 0; i < a; i++)
	{
		int a, b;
		in >> a >> b;
		out << F1(a, b) << endl;
	}
}