Скачиваний:
13
Добавлен:
01.05.2014
Размер:
521 б
Скачать
#include <iostream.h>
#include <math.h>
#include <stdio.h>
#include <iostream.h>
#include <conio.h>
double F(double x)
{
 return (4*x*x*x+3*x*x*x*x);
}
void main()
{
  clrscr();
	double x1,x2,h,f,x,a,b;
	h=0.001;
	x1=0.4;
	x2=x1+h;

		 if(F(x2)<F(x1))
		 { h=-h;
			 x2=x1+h;
		 };

		 while(F(x2)<F(x1))
		 { h=2*h;
			 x2=x1+h;
			 x1=x2;
		 };
	 a=x2-h*3/2;              
	 b=x2;

	 cout<<"\n        ‡­ зҐ­ЁҐ  ="<<a;
	 cout<<"\n        ‡­ зҐ­ЁҐ b="<<b;

	 getch();
}








Соседние файлы в папке all