#include #include float x,h,i,Fx,n,s,a,b, pi=3.1415; int main() { cout<<"a="; cin>>a; cout<<"b="; cin>>b; cout<<"h="; cin>>h; cout<<"n="; cin>>n; cout<<"x"<<"t"<<"Fx"< for (x=a; x,b; x=x+h) { s=0; for(i=1; i<=n; i++)
s=s+1/pow((2*i-1),2)*cos(pi*(2*i-1))/2*x; Fx=1-s*8/(pi*pi); cout< }
}
Tugallash!
boshlash
Do'stlaringiz bilan baham: |