Пример: Транспортная логистика
Я ищу:
На главную  |  Добавить в избранное  

Кибернетика /

Вычисление интеграла методом Ньютона-Котеса (теория и программа на Паскале)

←предыдущая следующая→
1 2 3 4 5 6 7 8 9 



Скачать реферат


outtextxy(168,180,' Lyceum №1557 ');

outtextxy(168,210,' COURSE WORK ');

outtextxy(168,230,' «Calculation of integral ');

outtextxy(168,245,' by Newton-Cotes method» ');

outtextxy(158,270,' Author: Konoplev A.A. ');

outtextxy(158,285,' Supervisor:senior lecturer ');

outtextxy(158,300,' Koldaev V.D. ');

end;

end;

procedure win2(ea:word;var k:word);

{Окно выбора способа подсчета }

var

c:char;

x:integer;

f:string;

begin

setcolor(2);

setfillstyle(1,5);

bar(70,200,340,330);

rectangle(75,205,335,325);

rectangle(77,207,333,323);

settextstyle(0,0,0);

setfillstyle(1,15);

bar(80,250,330,270);

setfillstyle(1,5);

bar(80,285,330,305);

if ea mod 2 =0 then

begin

outtextxy(77,220,'Выбирете способ задания значений');

outtextxy(75,230,' функции. ');

outtextxy(70,255,' По таблице(в ручную)');

outtextxy(70,295,' По расчетам(автом т.)');

end

else

begin

outtextxy(77,220,' Choose a method of putting in');

outtextxy(75,230,' the values of function. ');

outtextxy(70,255,' By the table(by hand)');

outtextxy(70,295,' By calculations(automat.)');

end;

helpwin(ea);

if ea mod 2 =0 then

begin

outtextxy(360,140,'В этом способе необходимо');

outtextxy(360,155,'самостоятельно вводить');

outtextxy(360,170,'значения функции.');

end

else

begin

outtextxy(360,140,'In this method you have');

outtextxy(360,155,'to put in values of ');

outtextxy(360,170,'function by yourself.');

end;

x:=0;

repeat

if keypressed then

begin

c:=readkey;

if (c=#80) or (c=#72) then

x:=x+1;

setfillstyle(1,15);

if (x mod 2)=0 then

begin

bar(80,250,330,270);

setfillstyle(1,5);

bar(80,285,330,305);

helpwin(ea);

if ea mod 2 =0 then

begin

outtextxy(360,140,'В этом способе необходимо');

outtextxy(360,155,'самостоятельно вводить');

outtextxy(360,170,'значения функции.');

end

else

begin

outtextxy(360,140,'In this method you have');

outtextxy(360,155,'to put in values of ');

outtextxy(360,170,'function by yourself.');

end;

end

else

begin

bar(80,285,330,305);

setfillstyle(1,5);

bar(80,250,330,270);

helpwin(ea);

if ea mod 2 =0 then

begin

outtextxy(360,140,'В этом способе компьютер');

outtextxy(360,155,'сам вычесляет значения');

outtextxy(360,170,'функции по вводимой функции.');

end

else

begin

outtextxy(360,140,'In this method PC will');

outtextxy(360,155,'automaticly count the value');

outtextxy(360,170,'of function by the function');

outtextxy(360,185,'you enter ');

end;

end;

setcolor(2);

if ea mod 2 =0 then

begin

outtextxy(70,255,' По таблице(в ручную)');

outtextxy(70,295,' По расчетам(автом т.)');

end

else

begin

outtextxy(70,255,' By the table(by hand)');

outtextxy(70,295,' By calculations(automat.)');

end;

end;

until c=#13;

k:=x mod 2;

end;

procedure wwod1(ea:word;var y:array of double;var n:integer;var a,b:real);

{Окно ручного ввода функции}

var

i,p:integer;

s,f:string;

p1:real;

c:char;

begin

wwodn(ea,n);

if n=0 then

wwodn(ea,n);

newsc(ea);

wwodab(ea,a,b);

helpwin(ea);

if ea mod 2 =0 then

begin

outtextxy(360,140,'В этом окне необходимо');

outtextxy(360,155,'постепенно вводить');

outtextxy(360,170,'значения функции.');

outtextxy(360,185,'после каждого ввода');

outtextxy(360,200,'определенного значения');

outtextxy(360,215,'нажмите ENTER.');

end

else

begin

outtextxy(360,140,'In this window you have');

outtextxy(360,155,'to gradually enter the');

outtextxy(360,170,'values of functions.');

outtextxy(360,185,'After each enter press');

outtextxy(360,200,'ENTER key.');

end;

setfillstyle(1,9);

bar(40,200,330,300);

rectangle(45,205,325,295);

rectangle(47,207,323,293);

if ea mod 2 =0 then

outtextxy(56,227,'Введите 0 -е значение финкции:')

else

outtextxy(56,227,' Enter 0 -th value of function:');

for i:=0 to n do

begin

setfillstyle(1,0);

bar(137,250,180,273);

gotoxy(19,17);

setfillstyle(1,9);

read(p1);

y[i]:=p1;

bar(120,227,134,240);

str(i+1,s);

outtextxy(120,227,s);

bar(310,220,320,250);

end;

end;

procedure wwod2(ea:word;var ea1:word;var n:integer;var a,b:real;var st:string);

{Окно 2 меню автомат. подсчета}

var

i:integer;

c,k:char;

x:longint;

f:string;

begin

repeat

x:=-600000;

if keypressed then

c:=readkey;

c:='t';

newsc(ea);

setfillstyle(1,15);

bar(70,120,342,330);

setcolor(12);

rectangle(75,125,337,325);

rectangle(77,127,335,323);

settextstyle(0,0,0);

setfillstyle(1,11);

bar(80,170,330,190);

if ea mod 2 =0 then

begin

outtextxy(80,130,'Меню ввода параметров нахождения');

outtextxy(80,140,' интеграла');

outtextxy(80,180,' Ввести количество узлов(n)');

outtextxy(80,210,' Ввести приделы интегрирования');

outtextxy(80,240,' Ввести функцию');

outtextxy(80,270,' Считать интеграл');

outtextxy(80,300,' Выход ');

end

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');

←предыдущая следующая→
1 2 3 4 5 6 7 8 9 



Copyright © 2005—2007 «Mark5»