Browse Source

add Vmiddle2

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

6
src/funktion.c

@ -206,3 +206,9 @@ float Vmiddle(float x1, float z1) {
result = result * 0.5; result = result * 0.5;
return result; return result;
} }
float Vmiddle2(float x2,float z2) {
x2 = x2 + z2;
printf("%f", x2 * 0.5);
x2 = x2 * 0.5;
return x2;
}

1
src/funktion.h

@ -36,5 +36,6 @@ float Vmultiplier2(float x2,float m);
float Vmultiplier3(float x3,float m); float Vmultiplier3(float x3,float m);
double Vparallel(double x1, double x2, double x3, double z1, double z2, double z3); double Vparallel(double x1, double x2, double x3, double z1, double z2, double z3);
float Vmiddle(float x1, float z1); float Vmiddle(float x1, float z1);
float Vmiddle2(float x2, float z2);
#endif #endif

6
src/main.c

@ -157,4 +157,10 @@ int main()
z1 = getValue('Z'); z1 = getValue('Z');
Vmiddle(x1, z1); Vmiddle(x1, z1);
printf("y eingeben ");
x2 = getValue('X');
printf("b eingeben ");
z2 = getValue('Z');
Vmiddle2(x2, z2);
} }
Loading…
Cancel
Save