Untitled

mail@pastecode.io avatar
unknown
c_cpp
8 months ago
382 B
0
Indexable
Never
#include <iostream>
#include <fstream>
using namespace std;


void f(int N, int A, int d, ofstream &abbe) {
	
	int x = A;
	int y = 0;

	for (int i = A; i < N + A; i += d) {
		y = (i * i) + (5 * i) - 4;
		abbe <<"x= " << i << "; " << "y = " << y << "\n";
	}
}

int main()
{
	ofstream abbe("chufur.txt");
	int N, A, d;
	cin >> N >> A >> d;
	f(N, A, d, abbe);

}
Leave a Comment