Merlin Cori
Вырвался с пары по прологу, держи первую прогу

Код:
uses
crt;
function nod (a, b: word): word;
begin
while a <> b do if a > b then dec (a, b) else dec (b, a);
nod := a;
end;
var
x, y, z: word;
begin
clrscr;
write ('x = '); readln (x);
write ('y = '); readln (y);
write ('z = '); readln (z);
writeln ('nod = ', nod (nod (x, y), z));
readkey;
end.
Ща чучка попозжа вторую положу
Держи вторую

Код:
uses
crt;
const
n = 4;
var
a: array [1..n] of integer;
i: integer;
p: boolean;
begin
clrscr;
randomize;
write ('array [');
for i := 1 to n do begin
a[i] := random(4);
write (a[i]:3);
end;
writeln ('] is palindrom? ');
p := true;
for i := 1 to (n div 2) do begin
p := p and (a[i] = a[n - i + 1]);
if p then break;
end;
if p then writeln ('yes! :)') else writeln ('no... :(');
readkey;
end.
Усё... Побегу дальше пролог мучить (или студентов?)