Browse Source

add viereckUmfang

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

3
src/funktion.c

@ -333,4 +333,7 @@ double dreieckUmfangn(double a, double b, double c) {
}
double viereckFlaeche(double a, double b) {
return a * b;
}
double viereckUmfang(double a, double b){
return (2 * a) + (2 * b);
}

1
src/funktion.h

@ -58,5 +58,6 @@ 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);
double viereckUmfang(double a, double b);
#endif

5
src/main.c

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