Const
n = 50;// количество элем массиваvar
a: array [1..n] of integer;
kol, i: integer;begin
for i := 1 to n do
readln(a[i]);
for i := 2 to n - 1 do
if (a[i] > a[i + 1]) and (a[i] > a[i - 1]) then
kol := kol + 1;
writeln(kol);
end.
.....................................
program shegor2003;
var a:array[1..7,1..7] of integer;
i,j:integer;
begin
for i:= 1 to 7 do
for j:= 1 to 7 do
a[i,j]:=random(101)-50;
writeln('Исходный массив:');
for i:= 1 to 7 do begin
for j:= 1 to 7 do
write(a[i,j]:4);
writeln;
end;
for i:= 2 to 6 do
for j:= 2 to 6 do
if i+j<=8 then
a[i,j]:=99;
writeln; writeln('Преобразованный массив:');
for i:= 1 to 7 do begin
for j:= 1 to 7 do
write(a[i,j]:4);
writeln;
end;
end.
program noname;
uses crt;
var
x,y:real;
begin
clrscr;
write('x='); readln(x);
write('y='); readln(y);
if (x>1) or (x<-1)or (y>1) or (y<-1) then
writeln('no')
else writeln('yes');
readkey;
end.