Browse Source

add Vadd

main
fdai6887 2 years ago
parent
commit
4ff20cc9dd
  1. 6
      src/funktion.c
  2. 1
      src/funktion.h
  3. 8
      src/main.c

6
src/funktion.c

@ -133,3 +133,9 @@ double Vlength(float x1, float x2, float x3) {
result = sqrt(E); result = sqrt(E);
return result; return result;
} }
float Vadd(float x1, float z1) {
float X1;
X1 = x1 + z1;
printf("(%f: \n", X1);
return X1;
}

1
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); double GewinnMaximum(double p,double q,double tc,double tr);
float Vshift(float x1,float s1); float Vshift(float x1,float s1);
double Vlength(float x1, float x2, float x3); double Vlength(float x1, float x2, float x3);
float Vadd(float x1, float z1);
#endif #endif

8
src/main.c

@ -6,7 +6,7 @@
int main() 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'); a = getValue('a');
b = getValue('b'); b = getValue('b');
h = getValue('h'); h = getValue('h');
@ -108,4 +108,10 @@ int main()
x2 = getValue('X'); x2 = getValue('X');
x3 = getValue('X'); x3 = getValue('X');
Vlength(x1, x2, x3); Vlength(x1, x2, x3);
printf("x eingeben ");
x1 = getValue('x');
printf("a eingeben");
z1 = getValue('z');
Vadd(x1,z1);
} }
Loading…
Cancel
Save