include conio include math using namespace std float F_L float const f

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <conio>
#include <math>
using namespace std;
float F_L(float x)
{
const float Pi = 3.14159265;
const float E = 2.71828182;
const float dX = 0.0001;
double S = 0;
for(float c = 0; c < x; c += dX)
S += (pow(E, -pow(c, 2) + pow(E, -pow(c + dX, 2))/2 * dX;
return 1/sqrt(2*Pi)*S;
}
int main()
{
for (float i = 0.01; i < 0.63; i+=0.01)
{
cout << "i=" << i << ", Laplas function="<< F_L(i) << endl;
}
getch();
return 0;
}