Iteratsiya usuli blok sxemasi
Tenglamarni oddiy iteratsiya usulida yechishning dasturi
#include
#include
using namespace std;
float f(float x)
{
return (exp(x)-2)/10.;
}
int main(){
float x, x0, e,a,b;
int n,i;
cout<<"birinchi yaqinlashish nuqtani kiriting";
cin>>x0;
cout<<"aniqligi";
cin>>e;
cout<<"iterasiyalar soni"; cin>>n;
x=x0;
for(i=1;i<=n;i++){
a=f(x);
if(fabs(x-a)<=0) break;
x=a;
}
cout<<"iterasiyalar soni="<
cout<<"noma'lum had="<
return 0;}
Mustaqil yechish uchun topshiriqlar
1) x3-3x2+5x+1=0
2) x3-20x+5=0
3) 2x3-x-5=0
7) 2x3-2x-1=0
8) 3x+cosx+1=0
x3-x7=0
lnx+2 =0
2x3-2x2+3x+1=0
x+cosx-1=0
2x3-x-5=0
x3+2x2+5x+2=0
x3-3x2+2x-4=0
x2+4sinx=0
lnx+x+1=0
2x3+2x-4=0
2x-lgx=3
x3-2x2+7x-1=0
x3-3x2+6x+2=0
3x-2lnx=4
2x3+3x+4=0
x3-2x+2=0
x3-3x2+2x-4=0
4x-ex=0
x3+x-8=0
x3-3x2+5x+1=0
Do'stlaringiz bilan baham: |