Untitled
unknown
plain_text
2 years ago
306 B
6
Indexable
#include <iostream>
#include <fstream>
using namespace std;
void y(ofstream &file, int n) {
int i = 1;
while (i <= n) {
file << i << " ";
cout << i << " ";
i++;
}
}
int main(){
int n;
cin >> n;
ofstream file("y(x).txt");
y(file, n);
}Editor is loading...
Leave a Comment