diff --git a/src/funktion.c b/src/funktion.c index 88ea51e..57bfdf9 100644 --- a/src/funktion.c +++ b/src/funktion.c @@ -330,4 +330,7 @@ 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; } \ No newline at end of file diff --git a/src/funktion.h b/src/funktion.h index cab2fed..a462b49 100644 --- a/src/funktion.h +++ b/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 diff --git a/src/main.c b/src/main.c index 4d6cb2b..0643dd0 100644 --- a/src/main.c +++ b/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); }