Browse Source

add Vaddx3

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

6
src/funktion.c

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

1
src/funktion.h

@ -27,5 +27,6 @@ float Vshift(float x1,float s1);
double Vlength(float x1, float x2, float x3); double Vlength(float x1, float x2, float x3);
float Vadd(float x1, float z1); float Vadd(float x1, float z1);
float Vaddx2(float x2, float z2); float Vaddx2(float x2, float z2);
float Vaddx3(float x3, float z3);
#endif #endif

8
src/main.c

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