Created
March 23, 2023 18:53
-
-
Save HamsterofDeath/70f4dd116840b3b9023bc7442c00bba9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package superprof; | |
public class Unroll { | |
static int zaehler = 0; | |
public static void main(String[] args) { | |
int x = 1; | |
// Test '1' | |
System.out.print('1' + "\n\r"); | |
zaehler++; | |
boolean test1 = true; | |
while (true) { | |
// Test '2' | |
System.out.print('2' + "\n\r"); | |
zaehler++; | |
boolean test2 = true; | |
// Check condition | |
if (!(test2 && (x <= 2))) { | |
break; | |
} | |
x++; | |
// Test '4' | |
System.out.print('4' + "\n\r"); | |
zaehler++; | |
// Test '3' | |
System.out.print('3' + "\n\r"); | |
zaehler++; | |
boolean test3 = true; | |
} | |
System.out.println("Zähler = " + zaehler); | |
} | |
static boolean test(char num) { | |
System.out.print(num + "\n\r"); | |
zaehler++; | |
return true; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment