diff --git a/src/funktion.c b/src/funktion.c index 8a95af0..8b8624c 100644 --- a/src/funktion.c +++ b/src/funktion.c @@ -415,4 +415,11 @@ double Druck(double F, double A) double Kraft(double p,double A) { return p * A; -} \ No newline at end of file +} +double Flaeche(double F, double p) +{ + double A; + A = F / p; + printf("Flaeche (A) = %.2lf\n", A); + return A; +} diff --git a/src/funktion.h b/src/funktion.h index 9e2b642..ef8bcf1 100644 --- a/src/funktion.h +++ b/src/funktion.h @@ -77,5 +77,6 @@ double Eintauchtiefe(double ps,double pfi,double g); double Ortsfaktor(double ps,double pfi,double h); double Druck(double F, double A); double Kraft(double A,double p); +double Flaeche(double p, double F); #endif diff --git a/src/main.c b/src/main.c index bce5457..d001d85 100644 --- a/src/main.c +++ b/src/main.c @@ -353,4 +353,10 @@ int main() p=getValue('P'); A=getValue('A'); Kraft(p,A); + + printf("Geben Sie die Kraft (F) ein: "); + F=getValue('F'); + printf("Geben Sie den Druck (p) ein: "); + p=getValue('P'); + Flaeche(p,F); }