Testeksamne, og andre ting

This commit is contained in:
2025-12-03 11:33:58 +01:00
parent 7d790d8126
commit 2c91d6de4a
17 changed files with 3337 additions and 0 deletions

21
Testeksamen/Draw.java Normal file
View File

@@ -0,0 +1,21 @@
public class Draw{
public static void main(String[] args) {
figure(8);
figure(4);
figure(2);
}
public static void figure(int n){
for(int i = 0; i < n; i++) {
for(int j = 0; j < i; j++) {
System.out.print(" ");
}
for(int j = 0; j < (2 * n) - 1 - (i*2); j++){
System.out.print("*");
}
System.out.println();
}
}
}