(x)=| |
Shartga kura
Tengsizlikdan n=2 ekanligi kelib chiqadi.
F(x)= =( ) (
F(0.3) =( ) ( =0.397
F(0.5) =( ) (
Taqriiy qiymati topiladu. Qator hadlari soni ko’p bulgan hollarda hisoblarni dastur asosida kampyuterda bajarish kerak.
Quyida shu misilning algoretim-blok-sxemasi , C++ dastur kodi va natejasi kiritilgan.
#include
#include
using namespace std;
long F(int n) {
if (n==0 or n==1) return 1;
return F(n-1)*n;
}
int main () {
float x,e; int n; cin>>x>>e;
float s=0; n=0;
while (fabs(pow(x,3*n+1)/(F(n)*F(2*n+1)))>e)
{
s+=pow(-1,n)*pow(x,3*n+1)/(F(n)*F(2*n+1));
n++;}
cout<
cout<
}
Do'stlaringiz bilan baham: |