main
Dominic Grimm 3 months ago
parent a4c17aef03
commit 53bdf0c557
Signed by: dergrimm
GPG Key ID: 6F294212DEAAC530
  1. 30
      README.md
  2. 2
      praktikum_7/number_1.c
  3. 28
      praktikum_7/number_3.c
  4. BIN
      programmierung_praktikum.pdf

@ -1189,7 +1189,7 @@ int main(void) {
printf("Operator: ");
scanf(" %c", &op);
printf("Result: %i", berechne(x, y, op));
printf("Result: %i\n", berechne(x, y, op));
return 0;
}
@ -1266,29 +1266,15 @@ int main(int argc, char *argv[]) {
#include <stdio.h>
long int ggt_while(long int x, long int y) {
if (x == y) {
return x;
} else if (x > y) {
x -= y;
while (x != y) {
if (x > y) {
x -= y;
} else {
y -= x;
}
}
return x;
} else {
y -= x;
while (x != y) {
if (x > y) {
x -= y;
} else {
y -= x;
}
while (x != y) {
if (x > y) {
x -= y;
} else {
y -= x;
}
return x;
}
return x;
}
long int ggt_rec(long int x, long int y) {

@ -25,7 +25,7 @@ int main(void) {
printf("Operator: ");
scanf(" %c", &op);
printf("Result: %i", berechne(x, y, op));
printf("Result: %i\n", berechne(x, y, op));
return 0;
}

@ -1,29 +1,15 @@
#include <stdio.h>
long int ggt_while(long int x, long int y) {
if (x == y) {
return x;
} else if (x > y) {
x -= y;
while (x != y) {
if (x > y) {
x -= y;
} else {
y -= x;
}
}
return x;
} else {
y -= x;
while (x != y) {
if (x > y) {
x -= y;
} else {
y -= x;
}
while (x != y) {
if (x > y) {
x -= y;
} else {
y -= x;
}
return x;
}
return x;
}
long int ggt_rec(long int x, long int y) {

Binary file not shown.
Loading…
Cancel
Save