Untitled
unknown
plain_text
3 years ago
350 B
3
Indexable
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
using namespace std;
float func(float a, float b) {
return a * a - 5 * b;
}
int main() {
ifstream in("func.txt");
ofstream out("result.txt");
float a, b;
int c;
in >> c;
for (int i = 0; i < c; i++){
in >> a >> b;
out << func(a, b) << '\n';
}
}Editor is loading...