Вычисление интеграла методом Ньютона-Котеса (теория и программа на Паскале)
else
begin
outtextxy(80,130,'Menu of entering the parameters');
outtextxy(80,140,' of integral');
outtextxy(80,180,' Put in the number of units ');
outtextxy(80,210,' Enter the bounds of integral');
outtextxy(80,240,' Enter function');
outtextxy(80,270,' Count integral');
outtextxy(80,300,' Exit ');
end;
helpwin(ea);
if ea mod 2 =0 then
begin
outtextxy(360,140,' Нажмите Enter для');
outtextxy(360,155,' ввода количества узлов');
end
else
begin
outtextxy(360,140,' Press Enter to put');
outtextxy(360,155,' in the number of units');
end;
repeat
if keypressed then
begin
c:=readkey;
case c of
#80:
x:=x-1;
#72:
x:=x+1;
end;
setfillstyle(1,11);
case (abs(x) mod 5) of
0:
begin
bar(80,170,330,190);
setfillstyle(1,15);
bar(80,200,330,220);
bar(80,290,330,310);
helpwin(ea);
if ea mod 2 =0 then
begin
outtextxy(360,140,' Нажмите Enter для');
outtextxy(360,155,' ввода количества узлов');
end
else
begin
outtextxy(360,140,' Press Enter to put');
outtextxy(360,155,'in the number of units.');
end;
end;
1:
begin
bar(80,200,330,220);
setfillstyle(1,15);
bar(80,170,330,190);
bar(80,230,330,250);
helpwin(ea);
if ea mod 2 =0 then
begin
outtextxy(360,140,' Нажмите ENTER для ввода');
outtextxy(360,155,'приделов интегрирования.');
end
else
begin
outtextxy(360,140,' Press ENTER to put in');
outtextxy(360,155,'the bounds of integral.');
end;
end;
2:
begin
bar(80,230,330,250);
setfillstyle(1,15);
bar(80,200,330,220);
bar(80,260,330,280);
helpwin(ea);
if ea mod 2 =0 then
begin
outtextxy(360,140,' Нажмите ENTER для ввода');
outtextxy(360,155,'функции.');
end
else
begin
outtextxy(360,140,' Press ENTER to enter');
outtextxy(360,155,'function.');
end;
end;
3:
begin
bar(80,260,330,280);
setfillstyle(1,15);
bar(80,230,330,250);
bar(80,290,330,310);
helpwin(ea);
if ea mod 2 =0 then
begin
outtextxy(360,140,' Нажмите ENTER для начала');
outtextxy(360,155,'подсчета самого интеграла.');
end
else
begin
outtextxy(360,140,' Press ENTER to begin');
outtextxy(360,155,'integral calculations.');
end;
end;
4:
begin
bar(80,290,330,310);
setfillstyle(1,15);