Vorlesung 5 / Aufgabe 3

This commit is contained in:
Sebastian Brosch 2024-05-09 12:32:30 +02:00
parent a6205b597b
commit dbca5fe6dd
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,22 @@
package VL05.Aufgabe03;
/**
* Vorlesung 5 / Aufgabe 3
*
* @author Sebastian Brosch
*/
public class Aufgabe03 {
public static void main(String[] args) {
loop(1);
}
/**
* Method to create a recursive infinite loop.
*
* @param counter The counter to measure the depth of the recursion.
*/
private static void loop(int counter) {
System.out.println(counter);
loop(++counter);
}
}

6
VL05/Aufgabe03/run.ps1 Normal file
View File

@ -0,0 +1,6 @@
Set-Location ../../
javac ./VL05/Aufgabe03/Aufgabe03.java
java VL05.Aufgabe03.Aufgabe03 > VL05/Aufgabe03/output/output.txt
Set-Location ./VL05/Aufgabe03/