FISH.





Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/virtwww/w_beloshenko-org-ua_e2c5fc46/http/topp.php on line 8

Warning: include(http://www.beloshenko.org.ua/panel.html) [function.include]: failed to open stream: no suitable wrapper could be found in /home/virtwww/w_beloshenko-org-ua_e2c5fc46/http/topp.php on line 8

Warning: include() [function.include]: Failed opening 'http://www.beloshenko.org.ua/panel.html' for inclusion (include_path='.:') in /home/virtwww/w_beloshenko-org-ua_e2c5fc46/http/topp.php on line 8







Numerical integration. (C)

integral(f(x),a,b)

// integral(f(x),a,b)
#include "iostream.h"
#include "math.h"

float f(float x)
{
 return sin(x);
}

void main()
{
 float integral;
 float a;
 float b;
 float x;
 float dx;

 a=1;
 b=2;
 dx=0.001;

 integral=0;
 x=a;
 while(x<b)
 {
  integral+=f(x)*dx;
  x+=dx;
 };

 cout << integral;
 cin >> integral;
}


FREE VIRAL OF YOU SITE.

 









Click Here for Free Traffic!

FISH.