#include <iostream>
#include <ctime>
using namespace std;
int main ()
{
<span> setlocale (0,"russian");
</span><span> srand (time(NULL));
</span><span> short N;</span><span>
int sum=0;</span><span>
int max=0;</span><span>
cout << "N=";</span><span>
cin >> N;
</span><span> int *array=new int [N];</span><span>
for (short i=0;i<N;i++)</span><span>
array[i]=rand()%201-100;
</span><span> cout << "Получившийся массив: " << endl;
</span><span> for (short i=0;i<N;i++)</span><span>
{
</span><span> cout << array[i] << ' ';
</span><span> sum+=array[i];</span><span>
}
</span><span> for (short i=0;i<N-1;i++)</span><span>
{
</span><span> if (max<array[i])
</span><span> max=array[i];</span><span>
}
</span><span> cout << endl;</span><span>
cout << "Сумма элементов: " << sum << endl;</span><span>
cout << "Максимальное число: " << max << endl;
</span><span> system ("PAUSE");
</span><span> return 0;
</span><span>}</span>
#include<bits/stdc++.h>
using namespace std;
int main(){ int min = 1000, max = 0; int a[30]; for(int i = 1; i <= 30; i++){ cin >> a[i]; if(a[i] > max) max = a[i]; if(a[i] < min) min = a[i]; } cout << min << " " << max << endl; return 0;}
Var A: Array of Integer;
N: Integer;
i: Integer;
sum: Integer;
Begin
Randomize;
Write('N = ');
ReadLn(N);
SetLength(A, N + 1);
WriteLn('Массив:');
For i := 1 To N Do
Begin
A[i] := Random(50) - 25;
Write(A[i] + ' ');
End;
WriteLn;
WriteLn('Без отрицательных:');
For i := 1 To N Do Begin
If A[i] >= 0 Then
Write(A[i] + ' ');
End;
sum := 0;
WriteLn;
WriteLn('Среднее арифметическое:');
For i := 1 To N Do Begin
sum := sum + A[i];
End;
WriteLn(sum / N);
<span>End.</span>
Пусть Команда1 = <span>Сместиться на (х1,у1)
Чтоб вернуться в ту же точку</span>, надо чтоб смещение было (0;0)
dx = 0 = 2(x1+3+2)-6 = 0, x1=-2
dy = 0 = 2(y1+2+1)-4 = 0, y1=-1
Команда1 = <span>Сместиться на (-2,-1)</span>
Var
a,b:array[1..7]of integer;
i:integer;
begin
for i:=1 to 7 do a[i]:=random(15)+1;
b[1]:=a[7];
for i:=2 to 7 do b[i]:=a[i-1];
for i:=1 to 7 do writeln(a[i]:4,b[i]:4);
<span>end. </span>