This commit is contained in:
Mykola Fesenko
2025-07-29 08:08:23 +02:00
commit 899a05907b
355 changed files with 11002 additions and 0 deletions

30
8/Aufgabe3.~ava Normal file
View File

@@ -0,0 +1,30 @@
import java.io.*;
import java.util.Scanner;
public class Aufgabe3 {
public static void main(String arrgs[]) {
try {
Scanner input = new Scanner(System.in);
FileOutputStream schreib = new FileOutputStream("speicher.txt");
String zeile;
for (int i = 0;i <10 ;i++ ) {
zeile = input.next();
zeile += '\n';
schreib.write(zeile.getBytes(),0,zeile.length());
}
schreib.close();
} catch(FileNotFoundException e) {
System.out.println("Datei wurde nicht gefunden");
} catch (IOException e) {
System.out.println("Fehler: " + e.getMessage());
}
}
}