diff --git a/src/funktion.c b/src/funktion.c index 777a344..ae310d7 100644 --- a/src/funktion.c +++ b/src/funktion.c @@ -133,3 +133,9 @@ double Vlength(float x1, float x2, float x3) { result = sqrt(E); return result; } +float Vadd(float x1, float z1) { + float X1; + X1 = x1 + z1; + printf("(%f: \n", X1); + return X1; +} diff --git a/src/funktion.h b/src/funktion.h index 8cee551..6f0b4e1 100644 --- a/src/funktion.h +++ b/src/funktion.h @@ -25,5 +25,6 @@ double grenzGewinn(double p,double q,double tc); double GewinnMaximum(double p,double q,double tc,double tr); float Vshift(float x1,float s1); double Vlength(float x1, float x2, float x3); +float Vadd(float x1, float z1); #endif diff --git a/src/main.c b/src/main.c index 6bed386..5e16593 100644 --- a/src/main.c +++ b/src/main.c @@ -6,7 +6,7 @@ int main() { - double a,b,c,d,h,x1,s1,x2,x3; + double a,b,c,d,h,x1,s1,x2,x3,z1; a = getValue('a'); b = getValue('b'); h = getValue('h'); @@ -108,4 +108,10 @@ int main() x2 = getValue('X'); x3 = getValue('X'); Vlength(x1, x2, x3); + + printf("x eingeben "); + x1 = getValue('x'); + printf("a eingeben"); + z1 = getValue('z'); + Vadd(x1,z1); }