Browse Source

add Vmultiplier

main
fdai6887 2 years ago
parent
commit
8d0fc77192
  1. 5
      src/funktion.c
  2. 1
      src/funktion.h
  3. 8
      src/main.c

5
src/funktion.c

@ -157,3 +157,8 @@ float Vsubstract3(float x3, float z3) {
double result = x3 - z3;
return result;
}
float Vmultiplier(float x1,float m) {
x1 = x1 * m;
printf("(|%f",x1);
return x1;
}

1
src/funktion.h

@ -31,5 +31,6 @@ float Vaddx3(float x3, float z3);
float Vsubstract(float x1, float z1);
float Vsubstract2(float x2, float z2);
float Vsubstract3(float x3, float z3);
float Vmultiplier(float x1,float m);
#endif

8
src/main.c

@ -6,7 +6,7 @@
int main()
{
double a,b,c,d,h,x1,s1,x2,x3,z1,z2,z3;
double a,b,c,d,h,x1,s1,x2,x3,z1,z2,z3,m;
a = getValue('a');
b = getValue('b');
h = getValue('h');
@ -132,4 +132,10 @@ int main()
x3 = getValue('X');
z3 = getValue('z');
Vsubstract3(x3, z3);
printf("x eingeben");
x1 = getValue('X');
printf("m eingeben");
m = getValue('M');
Vmultiplier(x1, m);
}
Loading…
Cancel
Save