Browse Source

add Vsubstract2

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

4
src/funktion.c

@ -149,3 +149,7 @@ float Vsubstract(float x1, float z1) {
double result = x1 - z1; double result = x1 - z1;
return result; return result;
} }
float Vsubstract2(float x2, float z2) {
double result = x2 - z2;
return result;
}

1
src/funktion.h

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

6
src/main.c

@ -124,4 +124,10 @@ int main()
x1 = getValue('x'); x1 = getValue('x');
z1 = getValue('z'); z1 = getValue('z');
Vsubstract(x1, z1); Vsubstract(x1, z1);
printf("y eingeben ");
x2 = getValue('X');
printf("b eingeben");
z2 = getValue('z');
Vsubstract2(x2, z2);
} }
Loading…
Cancel
Save