Vorlesung 5 / Aufgabe 3
This commit is contained in:
parent
a6205b597b
commit
dbca5fe6dd
22
VL05/Aufgabe03/Aufgabe03.java
Normal file
22
VL05/Aufgabe03/Aufgabe03.java
Normal 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
6
VL05/Aufgabe03/run.ps1
Normal 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/
|
Loading…
Reference in New Issue
Block a user