Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <conio.h>
  4. #include <math.h>
  5. #include <complex>
  6. #include <valarray>
  7. using namespace std;
  8. const double pi = 3.141592653589793238462643383;
  9. double func() {
  10. double x=4;
  11. double A=(0.75+0.5*x);
  12. double C=(x-1.5);
  13. double N=6;
  14. double B=A/C;
  15. double G=C/A;
  16. double H=8*B;
  17. double J=1.0/24.0;
  18. //double A=1.75;
  19. //double C=0.5;
  20. //double N=6;
  21. //double A=(1.5+2)/2;
  22. //double C=2-1.5;
  23. //double N=6;
  24. //return (pi*25.2)*(3.3322045+((0.04166667)*0.00340136*(3.3322045+3.583)-0.5));
  25. //return (pi*25.2)*((log(8.0*A)/C)+((1.0/24.0)*pow((double)(C/A),2))*((log(8.0*A)/C)+3.583)-1.0/2.0);
  26. return (0.4*pi*36*A)*((log(H))+((J)*pow((double)(G),2))*((log(H))+3.583)-0.5); // типо работает
  27. //return (pi*25.2)*(3.3322045+0.0235211-0.5); //работает
  28. }
  29.  
  30. int _tmain(int argc, _TCHAR* argv[])
  31. {
  32. double y = func();
  33.  
  34. cout << "x: " << y << endl; //единичный вывод результатов
  35. getch(); // тормозит прогу
  36.  
  37. return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement