Browse Source

add Flaeche

main
fdai7615 2 years ago
parent
commit
3e45f26657
  1. 9
      src/funktion.c
  2. 1
      src/funktion.h
  3. 6
      src/main.c

9
src/funktion.c

@ -415,4 +415,11 @@ double Druck(double F, double A)
double Kraft(double p,double A) double Kraft(double p,double A)
{ {
return p * A; return p * A;
}
}
double Flaeche(double F, double p)
{
double A;
A = F / p;
printf("Flaeche (A) = %.2lf\n", A);
return A;
}

1
src/funktion.h

@ -77,5 +77,6 @@ double Eintauchtiefe(double ps,double pfi,double g);
double Ortsfaktor(double ps,double pfi,double h); double Ortsfaktor(double ps,double pfi,double h);
double Druck(double F, double A); double Druck(double F, double A);
double Kraft(double A,double p); double Kraft(double A,double p);
double Flaeche(double p, double F);
#endif #endif

6
src/main.c

@ -353,4 +353,10 @@ int main()
p=getValue('P'); p=getValue('P');
A=getValue('A'); A=getValue('A');
Kraft(p,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);
} }
Loading…
Cancel
Save