Browse Source

add viereckFlaeche

main
Fdai7396 2 years ago
parent
commit
ce23b7dba0
  1. 3
      src/funktion.c
  2. 1
      src/funktion.h
  3. 5
      src/main.c

3
src/funktion.c

@ -331,3 +331,6 @@ double dreieckFlaeche(double a, double b, double c) {
double dreieckUmfangn(double a, double b, double c) {
return a + b + c;
}
double viereckFlaeche(double a, double b) {
return a * b;
}

1
src/funktion.h

@ -57,5 +57,6 @@ double kreisFlaeche(double r);
double kreisUmfang(double r);
double dreieckFlaeche(double a, double b, double c);
double dreieckUmfangn(double a, double b, double c);
double viereckFlaeche(double a, double b);
#endif

5
src/main.c

@ -258,4 +258,9 @@ int main()
b = getValue('b');
c = getValue('c');
dreieckUmfangn(a,b,c);
a = getValue('a');
b = getValue('b');
viereckFlaeche(a,b);
printf("Der Flaecheninhalt des Vierecks betraegt: %lf\n", a * b);
}
Loading…
Cancel
Save