This commit is contained in:
2025-04-21 00:40:30 +02:00
parent 9ccc21edde
commit b8c75fc6d3
87 changed files with 2788 additions and 99 deletions

12
S1/GdCP/days.c Normal file
View File

@@ -0,0 +1,12 @@
int months[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int datum2int(int tag, int monat) {
for (int i = 0; i < monat - 1; tag += months[i++]);
return tag;
}
void int2datum(int tage, int *ergebnis) {
int m = 0;
for (; tage > months[m]; tage -= months[m++]);
ergebnis[0] = tage; ergebnis[1] = m+1;
}