Контрольная работа: Вычисление значения функции y(x)
В Pascal:
Program Summa;
uses crt;
const n=6;
Var x,j,z,d,Xn,h,F,S:Real;
i:Integer;
a:array [1..n] of Real;
BEGIN
clrscr;
randomize;
Write('enter please Xn,h=');
ReadLN(Xn,h);
for i:=1 to n Do
begin
Write('enter please a[i]=');
ReadLN(a[i]);
end;
x:=Xn;
S:=0;
for i:=1 to n Do
begin
j:=(ln(abs(3+x*x*x))*(abs(3+x*x*x)/(3+x*x*x)))-(exp((cos(x)*cos(x))*ln(2)));
z:=exp(1/7*ln(abs(j)))*abs(j)/j;
d:=sin(2*x)*cos(3*x)+sqrt(1+exp((x)*ln(2)));
F:=z/d;
S:=S+F*a[i];
x:=x+h;
end;
WriteLN('S=',S:10:3);