Browse Source

add Vsubstract3

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

6
src/funktion.c

@ -153,3 +153,9 @@ float Vsubstract2(float x2, float z2) {
double result = x2 - z2; double result = x2 - z2;
return result; return result;
} }
float Vsubstract3(float x3, float z3){
float X3;
X3 = x3 - z3;
printf("(%f: \n",X3);
return X3;
}

1
src/funktion.h

@ -30,5 +30,6 @@ 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); float Vsubstract2(float x2, float z2);
float Vsubstract3(float x3, float z3);
#endif #endif

6
src/main.c

@ -128,4 +128,10 @@ int main()
x2 = getValue('X'); x2 = getValue('X');
z2 = getValue('z'); z2 = getValue('z');
Vsubstract2(x2, z2); Vsubstract2(x2, z2);
printf("z eingeben");
x3 = getValue('X');
printf("c eingeben");
z3 = getValue('z');
Vsubstract3(x3, z3);
} }
Loading…
Cancel
Save