Browse Source

add Vsubstract

main
fdai6887 2 years ago
parent
commit
88bcb5b190
  1. 6
      src/funktion.c
  2. 1
      src/funktion.h
  3. 6
      src/main.c

6
src/funktion.c

@ -145,3 +145,9 @@ float Vaddx3(float x3, float z3){
double result = x3 + z3;
return result;
}
float Vsubstract(float x1, float z1) {
float X1;
X1 = x1 - z1;
printf("(%f: \n", X1);
return X1;
}

1
src/funktion.h

@ -28,5 +28,6 @@ double Vlength(float x1, float x2, float x3);
float Vadd(float x1, float z1);
float Vaddx2(float x2, float z2);
float Vaddx3(float x3, float z3);
float Vsubstract(float x1, float z1);
#endif

6
src/main.c

@ -120,4 +120,10 @@ int main()
x3 = getValue('X');
z3 = getValue('z');
Vaddx3(x3,z3);
printf("x eingeben");
x1 = getValue('x');
printf("a eingeben");
z1 = getValue('z');
Vsubstract(x1, z1);
}
Loading…
Cancel
Save