Browse Source

add vshift

main
Nurahmed Almadatov 2 years ago
parent
commit
77249dd538
  1. 5
      src/funktion.c
  2. 2
      src/funktion.h
  3. 11
      src/main.c

5
src/funktion.c

@ -118,3 +118,8 @@ double trapezFlaeche(double a, double b, double h) {
double result=(a + b) * h / 2; double result=(a + b) * h / 2;
return result; return result;
} }
float Vshift(float x1, float s1) {
printf("%f\n\n", x1 + (s1));
return x1 + (s1);
}

2
src/funktion.h

@ -23,4 +23,6 @@ double Stueckzeitakkort(double stueckkosten,double akkordzuschlag,double arbeits
double erloesfunktion(double p,double q); double erloesfunktion(double p,double q);
double grenzGewinn(double p,double q,double tc); double grenzGewinn(double p,double q,double tc);
double GewinnMaximum(double p,double q,double tc,double tr); double GewinnMaximum(double p,double q,double tc,double tr);
float Vshift(float x1,float s1);
#endif #endif

11
src/main.c

@ -6,8 +6,7 @@
int main() int main()
{ {
double a,b,c,d,h;
double a,b,c,d,h,x1,s1;
a = getValue('a'); a = getValue('a');
b = getValue('b'); b = getValue('b');
h = getValue('h'); h = getValue('h');
@ -100,4 +99,12 @@ int main()
c= getValue('K'); c= getValue('K');
d= getValue('F'); d= getValue('F');
GewinnMaximum(a,b,c,d); GewinnMaximum(a,b,c,d);
printf("Vektor\n");
printf("x eingeben");
x1 = getValue('X');
printf("Verschiebung\n");
printf("> verschiebung");
s1 = getValue('s');
Vshift(x1,s1);
} }
Loading…
Cancel
Save