Untitled
unknown
plain_text
2 years ago
371 B
6
Indexable
#include <iostream>
#include <fstream>
using namespace std;
void y(int x, int b, int c, ofstream &file) {
int y = 0;
while (x < 11) {
y = x * x + 5 * x - 4;
file << x << ' ' << y;
x += c;
cout << y << "\n";
}
}
int main(){
int b, c;
cin >> b >> c;
int x = b;
ofstream file("y(x).txt");
y(x, b, c, file);
}Editor is loading...
Leave a Comment