Untitled

 avatar
unknown
plain_text
2 years ago
547 B
4
Indexable
#include <iostream>

#include <string>

#include <fstream>

using namespace std;

int ffff(int a) 

{	

	int r =  a * 2 - 4 * a;
	
	return r;

}
int yyyyy(int b)

{

	int r = -8*b + 4;

	return r;

}

int funkcia(float a, float b)

{

	int c = ffff(a) * a - yyyyy(b) * b;

	return c;

}

int main()

{

	ifstream in("func.txt");

	ofstream out("result.txt");

	float a, b;

	float d;

	in >> d;

	for (int i = 0; i < d; i++)

	{

		in >> a >> b;

		out << funkcia(a, b) << endl;

	}

} 
Editor is loading...