Dzisiejsze laby. Reszta kiedy indziej

This commit is contained in:
2022-11-30 16:50:53 +01:00
parent 3f67343476
commit 48083a47de
2 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
#include <iostream>
#include <fstream>
using namespace std;
int generator(int n, char *nazwa){
ofstream plik(nazwa);
for (int i = 1; i <= n; i++) {
plik << i << endl;
}
plik.close();
return 0;
}
int main (int argc, char *argv[])
{
generator(atoi(argv[1]), argv[2]);
return 0;
}