?>
All about me ... QANTAS1 Something which terrifies / terrifying me2 Something which I'm worried/worry about3 The most horrifying/horrified thing that i've seenor heard this year.4 A piece of news which astonished / astonishing me5 ATV programme which I saw recently which I foundfascinated/fascinating6 A celebrity who often shocking shocks people7 A singer whose voice is so bad that it's embarrassedembarrassing8 Somewhere interesting interested that healways wanted to visit.9 The place where I feel most relaxed relaxing10 Something people do whichI find annoying annoyed.
Ответы
pascal
Объяснение:
var i, n, mysign, nsign: integer;
ismon: boolean;
a: array of integer;
begin
Write('Введите размер массива: '); ReadLn(n);
SetLength(a, n);
WriteLn('Введите Элементы массива: ');
for i := 0 to n - 1 do ReadLn(a[i]);
mysign := sign(a[1] - a[0]);
if mysign >= 0 then mysign := 1;
ismon := true;
for i := 2 to n - 1 do
begin
nsign := sign(a[i] - a[i - 1]);
if nsign >= 0 then nsign := 1;
if nsign <> mysign then ismon := false;
end;
if ismon then WriteLn('Массив монотонный') else WriteLn('Массив не монотонный');
end.