Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <conio.h>
- #include <math.h>
- #include <complex>
- #include <valarray>
- using namespace std;
- const double pi = 3.141592653589793238462643383;
- double func() {
- double x=4;
- double A=(0.75+0.5*x);
- double C=(x-1.5);
- double N=6;
- double B=A/C;
- double G=C/A;
- double H=8*B;
- double J=1.0/24.0;
- //double A=1.75;
- //double C=0.5;
- //double N=6;
- //double A=(1.5+2)/2;
- //double C=2-1.5;
- //double N=6;
- //return (pi*25.2)*(3.3322045+((0.04166667)*0.00340136*(3.3322045+3.583)-0.5));
- //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);
- return (0.4*pi*36*A)*((log(H))+((J)*pow((double)(G),2))*((log(H))+3.583)-0.5); // типо работает
- //return (pi*25.2)*(3.3322045+0.0235211-0.5); //работает
- }
- int _tmain(int argc, _TCHAR* argv[])
- {
- double y = func();
- cout << "x: " << y << endl; //единичный вывод результатов
- getch(); // тормозит прогу
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement