Browse Source

add Vmiddle

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

6
src/funktion.c

@ -201,3 +201,9 @@ double Vparallel(double x1, double x2, double x3, double z1, double z2, double z
}
return result;
}
float Vmiddle(float x1, float z1) {
x1 = x1 + z1;
printf("(%f|", x1 * 0.5);
x1 = x1 * 0.5;
return x1;
}

1
src/funktion.h

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

8
src/main.c

@ -153,4 +153,12 @@ int main()
z3 = getValue('Z');
Vparallel(x1, x2, x3, z1, z2, z3);
printf("1. Vektor\n");
printf("x eingeben");
x1 = getValue('X');
printf("2. Vektor\n");
printf("a eingeben");
z1 = getValue('Z');
Vmiddle(x1, z1);
}
Loading…
Cancel
Save