Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
472 B
0
Indexable
Never
using namespace std;

#include <iostream>
#include <iostream>
#include <stdio.h>
#include <string>
#include <ctime>
#include <fstream>


int y(int x) {
	int y;
	y = x * x + 5 * x - 4;
	return y;
		
}
                                       
int main()
{
	ofstream out("amogus.txt");
	int n, a, d;
	cin >> n >> a >> d;
	int x = a;
	for (int i = 0; i < n;i++, x+=d)
	{
		out <<"x = "<< x << "\n";
		out <<"y = " << y(x) << "\n";
	}
	
	
}



Leave a Comment