added ws202425 courses

This commit is contained in:
2024-11-14 13:11:04 +01:00
parent 800282c2e8
commit beb31897b1
461 changed files with 20368 additions and 0 deletions
@@ -0,0 +1,30 @@
#include <stdio.h>
#include <stdlib.h>
int y;
int f(int param1, int param2){
if (param2 == 0) {
printf("Fehler: Division durch %d nicht möglich \n", param2);
exit(EXIT_FAILURE);
}
else {
int res = (2*(param1*param1)) / param2;
return res;
}
}
int main(){
int x = 4;
while (1) {
scanf("%d", &y); // scanf erwartet Speicheradresse
if (y != 0){
break;
}
else {
printf("Fehler: Division durch 0 nicht möglich \n");
}
}
printf("%d \n",f(x,y));
}