1
0

feat: Initial commit

This commit is contained in:
2024-03-22 16:54:05 +01:00
parent 0d9957a125
commit d993185b89
25 changed files with 641 additions and 0 deletions

4
Lab04/evenFile.txt Normal file
View File

@@ -0,0 +1,4 @@
432
65346
3214
856

11
Lab04/inFile.txt Normal file
View File

@@ -0,0 +1,11 @@
123
432
75
1231231
65346
3245
3214
123
6345
856
0

6
Lab04/oddFile.txt Normal file
View File

@@ -0,0 +1,6 @@
123
75
1231231
3245
123
6345

10
Lab04/redir.c Normal file
View File

@@ -0,0 +1,10 @@
//usr/bin/gcc "$0" && ./a.out < inFile.txt 1> evenFile.txt 2> oddFile.txt; rm a.out; exit
#include <stdio.h>
int main() {
int n;
while (scanf("%d", &n) != EOF && n != 0) {
fprintf((n%2) ? stderr : stdout, "%d\n", n);
}
return 0;
}