1, max=200;
randomize ();
ax [i]=0;
ay [i]=0;
vy [i]=generator (max);
vx [i]=generator (max);
y [i]=generator (max);
x [i]=generator (max);
do
{
line (40,30,600,30);
line (40,30,40,450);
line (40,450,600,450);
line (600,30,600,450);
metod (x, y, vx, vy, ax, ay, N, i);
T +=t;
fillellipse (x [i] +300,-y [i] +300,10,10);
if ((x [i] +300> 590) | | (x [i] +300 <50))
vx [i] =-vx [i];
if ((-y [i] +300 <40) | | (-y [i] +300> 440))
vy [i] =-vy [i];
delay (10);
cleardevice ();
}
while (T <15);=2;=0; [0]=0; vy [0]=0; vx [1]=0; vy [1]=0; x [0]=0; x [1]=1.5; [0]=60; y [1]=60; ax [0]=0; ax [1]=0; ay [0]=0; ay [1]=0;
{
for (i=0; i
{
T +=t;
metod (x, y, vx, vy, ax, ay, N, i);
fillellipse (x [i] * 20 +300,-y [i] +300,9,9);
}
delay (20);
cleardevice ();
}(T<7);=12;=0;=0.1;=5;Ek=0,xs=0,ys=0,Tm,v=0,P;Kv=1.38;poly[8]={0,0,0,400,320,400,320,0};k=0,m=10,ydar=0;mx=1.8,my=4.5;(320,160,640,160);(320,320,640,320);(mx,my,k);=160;(mx,my,k);=320;(mx,my,k);(i=0;i<N;i++)
{
ax [i]=0;
ay [i]=0;
vx [i]=generator (max);
vy [i]=generator (max);
}=0; (i <12)
{
k=0;
for (unsigned j=0; j <3; j + +)
{
x [i]=5 + k;
k +=5;
i + +;
}
}=0; (i <12)
{
k=0;
for (unsigned j=0; j <4; j + +)
{
y [i]=5 + k;
k +=9;
i + +;
}
}
{
for (i=0; i
{
metod (x, y, vx, vy, ax, ay, N, i);
setcolor (WHITE);
setfillstyle (SOLID_FILL, WHITE);
fillellipse (x [i] * m,-y [i] * m +400,4,4);
Ek +=(vx [i] * vx [i] + vy [i] * vy [i]) / 2.0;
if (T <50)
{(160,0,160,400); (x [i] * m <5) {vx [i] =-vx [i]; ydar + +; v +=vx [i];} (x [ i] * m> 155) vx [i] =-vx [i]; ((-y [i] * m +400 <5) | | (-y [i] * m +400> 395)) vy [ i] =-vy [i];
}
else
{(160,0,160,100); (160,300,160,400); (x [i...