refactor various files

This commit is contained in:
2025-04-28 16:59:44 +02:00
parent 5049c3ec13
commit 05c830c8e2
97 changed files with 513 additions and 2676 deletions

9
S1/GdCP/uebung/a02.c Normal file
View File

@@ -0,0 +1,9 @@
int sequence(int x, int n){
if (n < 0) return 0;
for (int i = 0; i < n; i++) {
if (x % 2 == 0) x = x/2;
else x = 3 * x + 1;
if (x < 0) return -1;
}
return x;
};