Const n=10;
Var a:array[1..n] of integer;
i,k,j:integer;
Begin
Randomize;
For i:=1 to n do
Begin
A[i]:=Random(10);
Write(a[i],' ');
end;
Writeln;
For i:=1 to n do
Begin
If a[i] mod 3=0 then
Write(a[i],' ');
end;
for i:=1 to n-1 do
for j:=1 to n-i do
begin
if (a[j] > a[j+1]) then
begin
k:= a[j];
a[j] := a[j+1];
a[j+1] := k;
end;
end;
writeln;
for i:=1 to n do
write(a[i],' ');
readln;
<span> end.</span>
Var S: double;
begin
readln(S);
writeln('P = ', sqrt(S) * 4);
end.
#include "stdafx.h"
#include <iostream>
#include <stdio.h>
using namespace std;
int main ()
{<span>
unsigned short int x1,y1,x2,y2;</span>
<span> cout << "Input x1: ";</span><span>
cin>> x1;</span><span>
cout<<endl<<"Input y1: ";</span><span>
cin>> y1;</span><span>
cout << "Input x2: ";</span><span>
cin>> x2;</span><span>
cout<<endl<<"Input y2: ";
</span><span> cin>> y2;</span>
<span> if ((abs(x2-x1)!=1) || (abs(y2-y1) !=2))
</span><span> {cout<<"NOT";}</span><span> else
</span><span> {cout<<"OK"<<endl;}</span>
system("PAUSE");
return 0;
<span>}</span>