Исследование колебаний математического маятника
Математический маятник представляет собой шарик, подвешенный на нити, при сообщении шарику некоторой начальной скорости он начнёт колебательное движение. Причём если пренебречь силами сопротивления (создать идеальные условия), то маятник будет совершать гармонические колебания неограниченное количество времени. Это и помогают доказать исследования проводимые на ЭВМ. В данном курсовом проекте… Читать ещё >
Исследование колебаний математического маятника (реферат, курсовая, диплом, контрольная)
Введение
2
- 1. Постановка задачи 4
- 2. Математическая модель решения задачи 5
- 3. Алгоритм решения задачи 6
- 4. Схема алгоритма 8
- 5. Таблица идентификаторов 20
- 6. Текст программы 20
- 7. Результаты работы программы 30
- 8. Графическая часть 32
- 9. Анализ результатов 32
Литература
34
- Приложение 35
- Решение задачи с использование Microsoft Excel 35
Введение
При осуществлении проектов в машиностроительной области, начальной стадией реализации этого проекта является создание модели, которая по возможности могла бы учитывать все факторы, влияющие на качество, надежность, долговечность, заданные характеристики работы при эксплуатации. В соответствии с условиями работы и заданными техническими характеристиками необходимо спроектировать такую модель, которая бы отвечала всем поставленным требованиям. Однако в процессе разработки приходится воплощать несколько моделей и сравнивать их характеристики между собой для более оптимального решения проблемы, в этих случаях наиболее целесообразно использовать ЭВМ.
Автоматизация машиностроения требует не только автоматического управления режимами, например, механической обработки, прессования, термической, физико-химической обработки и других рабочих процессов машиностроения. Для полной механизации работ требуется автоматизация транспортирования (перемещения в пространстве) и переориентация объекта производства. В качестве такого объекта манипулирования может быть обрабатываемая деталь, инструмент или другой предмет самой разнообразной конфигурации. Чаще всего требуется не только переместить в пространстве, но и сориентировать деталь определенным образом, т. е. не только изменить ее местонахождение, но и развернуть в пространстве определенным образом. Эти операции выполняются манипуляторами промышленных роботов.
В данном курсовом проекте рассматривается движение математического маятника, как один из примеров разнообразия решаемых на ЭВМ задач. Компьютерные технологии очень ускорили изучение человеком различных процессов: физических, химических, математических, решение инженерных задач.
Математический маятник представляет собой шарик, подвешенный на нити, при сообщении шарику некоторой начальной скорости он начнёт колебательное движение. Причём если пренебречь силами сопротивления (создать идеальные условия), то маятник будет совершать гармонические колебания неограниченное количество времени. Это и помогают доказать исследования проводимые на ЭВМ.
1. Постановка задачи
Математическому маятнику массой m и длиной нити l в низшем положении сообщена горизонтальная скорость (рисунок 1).
Исследовать характер колебаний маятника при изменении времени от 0 до tкон, определив зависимость S (t) и построив её график. Силами сопротивления пренебречь.
Рисунок 1
Значения исходных данных:
Начальная скорость v0 = 0,05 м/с;
Длина нити l = 1 м;
Конечное время tкон = 1,8 с;
Количество разбиений n = 40.
2. Математическая модель решения задачи
Математическую модель задачи построим, используя второй закон Ньютона. Дифференциальное уравнение движения имеет вид:
.
Так как для окружности, то мы получим
.
Зададим следующие начальные условия движения тела:
.
Таким образом, для исследования характера движения тела необходимо найти решение задачи Коши:
.
Преобразуем её к системе дифференциальных уравнений первого порядка с начальными условиями:
.
Решим построенную систему методом Эйлера, используя формулы:
, , ,
, , для i = 2, 3, …, n + 1.
Получим таблично заданную зависимость S (t).
3. Алгоритм решения задачи
1. Вводим исходные данные V0, l, Tkon, n;
2. t1:=0; V1:=V0; S1:=0;
Проверка исходных данных производиться с помощью процедуры schityvanie. колебание маятник эйлер задача
3. schityvanie (var v0, l, Tkon: real; var n: integer);
4. Запись исходных данных производиться с помощью процедуры vvod_parametrov;
5. Записываем введённые данные с помощью процедуры zapis_parametrov в файл dannye.dan.
6. С помощью процедуры Max_Min определяем значения скорости V и пройденный путь S, а также находим максимальные и минимальные значения этих величин.
7. С помощью процедуры osi_koordinat строим оси координат для изображения графика зависимости S (t) и V (t).
8. С помощью процедуры MyGraphInit переводим режим работы компьютера с текстового на графический.
9. С помощью процедуры Graph_V выполняется построение графика зависимости V (t).
10. С помощью процедуры Graph_S выполняется построение графика зависимости S (t).
11. Результаты вычисления записываются в файл rezultat. dan с помощью процедуры Zapis_rez.
12. Процедура vybor обеспечивает выбор требуемой операции: ввод и контроль исходных данных, просмотр графиков V (t) и S (t), а также выход из программы.
13. Выполнение самой программы — последовательное выполнение всех процедур.
Алгоритм процедуры Max_Min
1. dt:=Tkon/n;
2. Для i:=2.n+1;
2.1. t:=(i-1)*dt;
2.2. v:=v-dt*9.8*sin (s/l);
2.3. s:=s+dt*v;
4. Схема алгоритма
Процедура schityvanie
Процедура vvod_parametrov
Процедура zapis_parametrov
Процедура Max_Min
Процедура osi_koordinat
Процедура MyGraphInit
Процедура Graph_V
Процедура Graph_S
Процедура Zapis_rez
Процедура vybor
Схема головной программы
5. Таблица идентификаторов
Наименование | физический смысл | идентификатор | |
Начальная скорость | V0 | V0 | |
Длина нити | l | l | |
Начальное время | t1 | t | |
Конечное время | tкон | Tkon | |
Число повторений | n | n | |
Отклонение маятника | S | S | |
Максимальное отклонение маятника | Smax | maxS | |
Минимальное отклонение маятника | Smin | minS | |
Скорость маятника | V | V | |
Максимальная скорость маятника | Vmax | maxV | |
Минимальная скорость маятника | Vmin | minV | |
Счётчик | ————; | i | |
6. Текст программы
program kursovoi_variant24;
uses graph, crt;
var
dan, rez: text;
graphdriver,
GraphMode,
ErrorCode:integer;
v0,l, Tkon: real;
n:integer;
maxV, minV, maxS, minS: real;
procedure schityvanie (var v0, l, Tkon: real; var n: integer);
var z: integer;
s:char;
begin
clrscr;
{$I-}
assign (dan,'dannye.dan');
reset (dan);
z:=ioresult;
{I+}
if z<>0 then
begin
writeln ('oshibka faila ''dannye.dan'' No:', z);
readkey;
Halt (1);
end;
readln (dan, s);
readln (dan, s);
read (dan, v0);
read (dan, l);
read (dan, Tkon);
read (dan, n);
close (dan);
end;
procedure vvod_parametrov (var v0, l, Tkon: real; var n: integer);
var i: integer;
s:char;
begin
repeat
clrscr;
writeln ('ishodnymi dannumi yavlyautsa:');
writeln ('na4al''naya skorost'' Vo: ', v0:4:3);
writeln ('dlinna niti mayatnika L: ', l:4:3);
writeln ('kone4noe vremya Tkon: ', tkon:4:3);
writeln ('koli4estvo razbienei po vremeni n: ', n);
writeln ('Vi hotite izmenit'' eti dannye?');
write ('Day, Netn, sdelaite vybor: ');
read (s);
if (s='y') or (s='Y') then
begin
write ('vvedite na4al''nuju skorost'' Vo:');
readln (v0);
write ('vvedite dlinnu niti mayatnika L: ');
readln (l);
write ('vvedite kone4noe vremya Tkon (v sekundah): ');
readln (Tkon);
write ('vvedite koli4estvo razbienei po vremeni n: ');
readln (n);
end;
if (s='n') or (s='N') then break
until (s='n') or (s='N');
end;
procedure zapis_parametrov (v0,l, Tkon: real;n:integer);
var z: integer;
s:char;
begin
clrscr;
{$I-}
assign (dan,'dannye.dan');
rewrite (dan);
z:=ioresult;
{I+}
if z<>0 then
begin
writeln ('oshibka faila ''dannye.dan'' No:', z);
readkey;
Halt (1);
end;
writeln (dan,'na4al''nymi dannymi yavlyautsa:');
writeln (dan,' Vo L Tkon n');
write (dan, v0:10:3);
write (dan, l:10:3);
write (dan, Tkon:10:3);
write (dan, n:10);
close (dan);
end;
procedure Max_Min (var MaxV, MinV, maxS, minS: real);
var i: integer;
S, V, dt, t: real;
begin
v:=v0;s:=0; maxS:=s;minS:=s;maxV:=v;minV:=v;
dt:=Tkon/n;i:=1;t:=0;
for i:=2 to n+1 do
begin
t:=(i-1)*dt;
v:=v-dt*9.8*sin (s/l);
s:=s+dt*v;
if maxS
if minS>s then minS:=s;if maxVif minV>v then minV:=v;end;end;procedure osi_koordinat (t, maxy, miny: real);var i: integer;dt, dy, x: real;s:string;begindt:=t/10;dy:=abs (maxy-miny)/10;setlinestyle (0,1,1);line (100,20,100,320);line (100,320,600,320);for i:=0 to 10 dobeginline (99,20+30*i, 101,20+30*i);x:=maxy-i*dy;str (x:4:4,s);moveTo (40,15+30*i);outText (s);line (100+50*i, 319,100+50*i, 321);x:=0+i*dt;str (x:4:3,s);outtextXY (90+50*i, 324, s);end;for I:=1 to 10 dobegin;setLineStyle (1,1,1);setColor (8);line (103,20+30*(i-1), 600,20+30*(i-1));line (100+50*i, 318,100+50*i, 20);setLineStyle (0,1,1);setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
if minV>v then minV:=v;end;end;procedure osi_koordinat (t, maxy, miny: real);var i: integer;dt, dy, x: real;s:string;begindt:=t/10;dy:=abs (maxy-miny)/10;setlinestyle (0,1,1);line (100,20,100,320);line (100,320,600,320);for i:=0 to 10 dobeginline (99,20+30*i, 101,20+30*i);x:=maxy-i*dy;str (x:4:4,s);moveTo (40,15+30*i);outText (s);line (100+50*i, 319,100+50*i, 321);x:=0+i*dt;str (x:4:3,s);outtextXY (90+50*i, 324, s);end;for I:=1 to 10 dobegin;setLineStyle (1,1,1);setColor (8);line (103,20+30*(i-1), 600,20+30*(i-1));line (100+50*i, 318,100+50*i, 20);setLineStyle (0,1,1);setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
end;procedure osi_koordinat (t, maxy, miny: real);var i: integer;dt, dy, x: real;s:string;begindt:=t/10;dy:=abs (maxy-miny)/10;setlinestyle (0,1,1);line (100,20,100,320);line (100,320,600,320);for i:=0 to 10 dobeginline (99,20+30*i, 101,20+30*i);x:=maxy-i*dy;str (x:4:4,s);moveTo (40,15+30*i);outText (s);line (100+50*i, 319,100+50*i, 321);x:=0+i*dt;str (x:4:3,s);outtextXY (90+50*i, 324, s);end;for I:=1 to 10 dobegin;setLineStyle (1,1,1);setColor (8);line (103,20+30*(i-1), 600,20+30*(i-1));line (100+50*i, 318,100+50*i, 20);setLineStyle (0,1,1);setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
var i: integer;dt, dy, x: real;s:string;begindt:=t/10;dy:=abs (maxy-miny)/10;setlinestyle (0,1,1);line (100,20,100,320);line (100,320,600,320);for i:=0 to 10 dobeginline (99,20+30*i, 101,20+30*i);x:=maxy-i*dy;str (x:4:4,s);moveTo (40,15+30*i);outText (s);line (100+50*i, 319,100+50*i, 321);x:=0+i*dt;str (x:4:3,s);outtextXY (90+50*i, 324, s);end;for I:=1 to 10 dobegin;setLineStyle (1,1,1);setColor (8);line (103,20+30*(i-1), 600,20+30*(i-1));line (100+50*i, 318,100+50*i, 20);setLineStyle (0,1,1);setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
s:string;begindt:=t/10;dy:=abs (maxy-miny)/10;setlinestyle (0,1,1);line (100,20,100,320);line (100,320,600,320);for i:=0 to 10 dobeginline (99,20+30*i, 101,20+30*i);x:=maxy-i*dy;str (x:4:4,s);moveTo (40,15+30*i);outText (s);line (100+50*i, 319,100+50*i, 321);x:=0+i*dt;str (x:4:3,s);outtextXY (90+50*i, 324, s);end;for I:=1 to 10 dobegin;setLineStyle (1,1,1);setColor (8);line (103,20+30*(i-1), 600,20+30*(i-1));line (100+50*i, 318,100+50*i, 20);setLineStyle (0,1,1);setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
dt:=t/10;dy:=abs (maxy-miny)/10;setlinestyle (0,1,1);line (100,20,100,320);line (100,320,600,320);for i:=0 to 10 dobeginline (99,20+30*i, 101,20+30*i);x:=maxy-i*dy;str (x:4:4,s);moveTo (40,15+30*i);outText (s);line (100+50*i, 319,100+50*i, 321);x:=0+i*dt;str (x:4:3,s);outtextXY (90+50*i, 324, s);end;for I:=1 to 10 dobegin;setLineStyle (1,1,1);setColor (8);line (103,20+30*(i-1), 600,20+30*(i-1));line (100+50*i, 318,100+50*i, 20);setLineStyle (0,1,1);setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
setlinestyle (0,1,1);line (100,20,100,320);line (100,320,600,320);for i:=0 to 10 dobeginline (99,20+30*i, 101,20+30*i);x:=maxy-i*dy;str (x:4:4,s);moveTo (40,15+30*i);outText (s);line (100+50*i, 319,100+50*i, 321);x:=0+i*dt;str (x:4:3,s);outtextXY (90+50*i, 324, s);end;for I:=1 to 10 dobegin;setLineStyle (1,1,1);setColor (8);line (103,20+30*(i-1), 600,20+30*(i-1));line (100+50*i, 318,100+50*i, 20);setLineStyle (0,1,1);setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
line (100,320,600,320);for i:=0 to 10 dobeginline (99,20+30*i, 101,20+30*i);x:=maxy-i*dy;str (x:4:4,s);moveTo (40,15+30*i);outText (s);line (100+50*i, 319,100+50*i, 321);x:=0+i*dt;str (x:4:3,s);outtextXY (90+50*i, 324, s);end;for I:=1 to 10 dobegin;setLineStyle (1,1,1);setColor (8);line (103,20+30*(i-1), 600,20+30*(i-1));line (100+50*i, 318,100+50*i, 20);setLineStyle (0,1,1);setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
beginline (99,20+30*i, 101,20+30*i);x:=maxy-i*dy;str (x:4:4,s);moveTo (40,15+30*i);outText (s);line (100+50*i, 319,100+50*i, 321);x:=0+i*dt;str (x:4:3,s);outtextXY (90+50*i, 324, s);end;for I:=1 to 10 dobegin;setLineStyle (1,1,1);setColor (8);line (103,20+30*(i-1), 600,20+30*(i-1));line (100+50*i, 318,100+50*i, 20);setLineStyle (0,1,1);setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
x:=maxy-i*dy;str (x:4:4,s);moveTo (40,15+30*i);outText (s);line (100+50*i, 319,100+50*i, 321);x:=0+i*dt;str (x:4:3,s);outtextXY (90+50*i, 324, s);end;for I:=1 to 10 dobegin;setLineStyle (1,1,1);setColor (8);line (103,20+30*(i-1), 600,20+30*(i-1));line (100+50*i, 318,100+50*i, 20);setLineStyle (0,1,1);setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
moveTo (40,15+30*i);outText (s);line (100+50*i, 319,100+50*i, 321);x:=0+i*dt;str (x:4:3,s);outtextXY (90+50*i, 324, s);end;for I:=1 to 10 dobegin;setLineStyle (1,1,1);setColor (8);line (103,20+30*(i-1), 600,20+30*(i-1));line (100+50*i, 318,100+50*i, 20);setLineStyle (0,1,1);setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
line (100+50*i, 319,100+50*i, 321);x:=0+i*dt;str (x:4:3,s);outtextXY (90+50*i, 324, s);end;for I:=1 to 10 dobegin;setLineStyle (1,1,1);setColor (8);line (103,20+30*(i-1), 600,20+30*(i-1));line (100+50*i, 318,100+50*i, 20);setLineStyle (0,1,1);setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
str (x:4:3,s);outtextXY (90+50*i, 324, s);end;for I:=1 to 10 dobegin;setLineStyle (1,1,1);setColor (8);line (103,20+30*(i-1), 600,20+30*(i-1));line (100+50*i, 318,100+50*i, 20);setLineStyle (0,1,1);setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
end;for I:=1 to 10 dobegin;setLineStyle (1,1,1);setColor (8);line (103,20+30*(i-1), 600,20+30*(i-1));line (100+50*i, 318,100+50*i, 20);setLineStyle (0,1,1);setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
begin;setLineStyle (1,1,1);setColor (8);line (103,20+30*(i-1), 600,20+30*(i-1));line (100+50*i, 318,100+50*i, 20);setLineStyle (0,1,1);setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
setColor (8);line (103,20+30*(i-1), 600,20+30*(i-1));line (100+50*i, 318,100+50*i, 20);setLineStyle (0,1,1);setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
line (100+50*i, 318,100+50*i, 20);setLineStyle (0,1,1);setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
setColor (15);end;end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
end;procedure MyGraphInit;beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
beginGraphDriver:=detect;initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
initGraph (graphdriver, GraphMode,'d:bpbgi');ErrorCode:=graphresult;if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
if Errorcode<>grOk thenbeginwriteln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
writeln ('proizoshla oshibka grafiki: ', grapherrormsg (errorCode));writeln ('rabota programmy prervana');readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
readln;Halt (1);end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
end;end;procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
procedure Graph_V;var i, x, y:integer;S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
S, V, dt, t: real;zn1:string;beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
beginsetcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
t:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
s:=s+dt*v;str (v:4:4,zn1);if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
if v=maxV then begin x:=getX; y:=getY;zn1:='maxV='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
outTextXY (100,380,zn1);moveTo (x, y);end;if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
if v=minV then begin x:=getX; y:=getY;zn1:='minV='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
lineTo (round (100+t*500/Tkon), round (320-(V-minV)*300/(maxV-minV)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
setcolor (15);outTextXY (100,420,'graphik zavisimosti V (t)')end;procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
procedure Graph_S;var i, x, y:integer;S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
S, V, dt, t: real;zn1:string;begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
begin setcolor (6);v:=v0;s:=0;t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
t:=0;dt:=Tkon/n;moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
moveTo (round (100+t*500/Tkon), round (320-(s-mins)*300/(maxS-minS)));for i:=2 to n+1 dobegint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
begint:=(i-1)*dt;v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
v:=v-dt*9.8*sin (s/l);s:=s+dt*v;str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
str (S:4:4,zn1);if s=maxS then begin x:=getX; y:=getY;zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
zn1:='maxS='+zn1;outTextXY (100,380,zn1);moveTo (x, y);end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
end;if S=minS then begin x:=getX; y:=getY;zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
zn1:='minS='+zn1;outTextXY (100,400,zn1);moveTo (x, y);end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
end;lineTo (round (100+t*500/Tkon), round (320-(S-minS)*300/(maxS-minS)));end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
end;setcolor (15);outTextXY (100,420,'graphik zavisimosti S (t)')end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
end;procedure Zapis_rez;var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
var i, z: integer;S, V, dt, t: real;beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
beginclrscr;{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
{$I-}assign (rez,'rezultat.dan');rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
rewrite (rez);z:=ioresult;{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
{I+}if z<>0 thenbeginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
beginwriteln ('oshibka faila ''rezultat.dan'' No:', z);readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
readkey;Halt (1);end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
end;writeln (rez,'_________________________________________');writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
writeln (rez,'| i t V S|');writeln (rez,'`———————————————————-''');v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
v:=v0;s:=0;dt:=Tkon/n;i:=1;t:=0;if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
if s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
writeln (rez, i:4,t:12:3,v:12:5,s:12:7);for i:=2 to n+1 dobegint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
begint:=(i-1)*dt;s:=s+dt*v;v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
v:=v-dt*9.8*sin (s/l);if v=maxV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxV') elseif v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
if v=minV then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minV') elseif s=maxS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== maxS') elseif s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
if s=minS then writeln (rez, i:4,t:12:3,v:12:5,s:12:7,'====== minS') elsewriteln (rez, i:4,t:12:3,v:12:5,s:12:7);end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
end;close (rez);end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
end;procedure vybor;var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
var s: char;beginrepeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
repeatRESTORECRTmODE;clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
clrscr;writeln ('1-ishodnue dannye');writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
writeln ('2-graphik V (t)');writeln ('3-grafik S (t)');writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
writeln ('9-EXIT');writeln ('sdelaite vybor nazhatiem');writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
writeln ('sootvetstvyuschei knopki');writeln;writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
writeln ('rezultat vy4islenei sohranyaetsya v faile ''rezultat.dan'' ');read (s);clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
clrscr;beginif s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
if s='1' thenbeginschityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
schityvanie (v0,l, Tkon, n);vvod_parametrov (v0,l, Tkon, n);zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
zapis_parametrov (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
end;if s='2' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
beginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
getgraphmode;ClearDevice;osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
osi_koordinat (Tkon, maxV, minV);graph_V;readkey;end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
end;if s='3' thenbeginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
beginmyGraphInit;getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
getgraphmode;ClearDevice;osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
osi_koordinat (Tkon, maxS, minS);graph_S;readkey;end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
end;end;until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
until s='9';zapis_rez;end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
end;beginschityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
schityvanie (v0,l, Tkon, n);Max_Min (MaxV, MinV, maxS, minS);vybor;closegraph;end.7. Результаты работы программы
vybor;closegraph;end.7. Результаты работы программы
end.7. Результаты работы программы
_________________________________________
| i t V S|
`———————————————————-'
1 0.000 0.5 000 0.0====== maxV
2 0.045 0.4 901 0.22 500
3 0.090 0.4 704 0.44 553
4 0.135 0.4 414 0.65 723
5 0.180 0.4 037 0.85 588
6 0.225 0.3 579 0.103 754
7 0.270 0.3 051 0.119 862
8 0.315 0.2 462 0.133 591
9 0.360 0.1 824 0.144 669
10 0.405 0.1 150 0.152 876
11 0.450 0.453 0.158 050
12 0.495 -0.253 0.160 087====== maxS
13 0.540 -0.954 0.158 947
14 0.585 -0.1 636 0.154 653
15 0.630 -0.2 286 0.147 290
16 0.675 -0.2 890 0.137 004
17 0.720 -0.3 437 0.124 000
18 0.765 -0.3 915 0.108 535
19 0.810 -0.4 316 0.90 916
20 0.855 -0.4 632 0.71 492
21 0.900 -0.4 855 0.50 650
22 0.945 -0.4 982 0.28 803
23 0.990 -0.5 010 0.6 384====== minV
24 1.035 -0.4 939 -0.16 161
25 1.080 -0.4 770 -0.38 386
26 1.125 -0.4 506 -0.59 849
27 1.170 -0.4 152 -0.80 124
28 1.215 -0.3 717 -0.98 809
29 1.260 -0.3 207 -0.115 534
30 1.305 -0.2 634 -0.129 965
31 1.350 -0.2 009 -0.141 818
32 1.395 -0.1 343 -0.150 856
33 1.440 -0.651 -0.156 901
34 1.485 0.53 -0.159 832====== minS
35 1.530 0.757 -0.159 591
36 1.575 0.1 446 -0.156 184
37 1.620 0.2 106 -0.149 677
38 1.665 0.2 724 -0.140 200
39 1.710 0.3 288 -0.127 941
40 1.755 0.3 787 -0.113 142
41 1.800 0.4 211 -0.96 099
8. Графическая часть
9. Анализ результатов
В результате работы был исследован характер движения математического маятника в идеальных условиях, то есть без учёта сил сопротивления. В ходе исследования выяснилось, что если ничего не препятствует движению маятника, он может колебаться бесконечно, поддерживая постоянную скорость и амплитуду, наблюдаются гармонические колебания. Графики зависимости S (t) и V (t) изображают идеальные синусоиду и косинусоиду.
При данной длине нити маятника равной l = 1 м, начальной скорости, сообщённой маятнику, равной V0 = 0,05 м/с, в промежутке времени tкон = 1,8 c, были получены следующие результаты:
В абсолютном значении наибольшая величина скорости V = 0,5 010 м/с зафиксировалась при t = 0.990 c, это скорость в момент, когда шарик проходит перпендикулярно оси X.
Минимальное значение скорости V = 0,53 м/с зафиксирована при t = 1,485 с.
Литература
1. Рапаков Г. Г., РжеуцкаяС.Ю. Тurbo Pascal для студентов и школьников. — СПБ.: БХВПетербург. 2004. — 352 с.:ил.
2. Анципорович П. П., Алейникова О. И., Булгак Т. И., Луцко Н. Я. Информатика. Учебно-метод. Пособие к лабораторным работам для студ. машиностроит. спец. В 4 ч. — Мн.: БНТУ, 2004.
Приложение
Решение задачи с использование Microsoft Excel
Решим поставленную задачу методом Эйлера, используя формулы:
, , ,
, , для i = 2, 3, …, n + 1.
Получим таблично заданную зависимость S (t).