//Pascal ABC.NET 3.1 сборка 1219
Var
ai,n1,n2,i,k,max:integer;
begin
readln(ai);
read(n1);
max:=-1;
k:=1;
for i:=2 to ai do
begin
read(n2);
if n2>=n1 then
begin
inc(k);
n1:=n2;
end
else
begin
k:=1;
n1:=n2;
end;
if k>max then max:=k;
end;
if max=-1 then writeln('1') else writeln(max);
end.
Пример ввода:
6
2
2
1
3
4
1
Пример вывода:
3
Информатика - это наука о процессах передачи,хранения,обработки информации.
<span><span>program massiv6;
</span><span>02.<span>uses crt;
</span></span><span>03.<span>const N=10;
</span></span><span>04.<span>type x=array [1..<span>N] </span>of integer;
</span></span><span>05.<span>var a:x;
</span></span><span>06.<span>i:integer;
</span></span><span>07.<span>s:integer;
</span></span><span>08.begin
</span><span>09.clrscr;
</span><span>10.randomize;
</span><span>11.<span>for i:=1 to <span>N </span>do
</span></span><span>12.begin
</span><span>13.<span>a[i]:=-100+random(201);
</span></span><span>14.<span>write (A[i]:5)
</span></span><span>15.<span>end;
</span></span><span>16.<span>writeln;
</span></span><span>17.<span>s:=0;
</span></span><span>18.<span>for i:=1 to <span>N </span>do
</span></span><span>19.<span>if a[i]>0 then
</span></span><span>20.begin
</span><span>21.s:=s+a[i]
</span><span>22.<span>end;
</span></span><span>23.<span>writeln (‘Сумма положительных элементов = ’,s:5);
</span></span><span>24.readln
</span><span>25.<span>end<span>.</span></span></span></span>
Program summa;
<span>var a, b, c, s: real; </span>
<span>begin </span>
<span>writeln('Введите числа a, b, c'); </span>
<span>readln(a,b,c); </span>
<span>s:=abs(a)+abs(b)+abs(c); </span>
<span>writeln('s=,'s); </span>
<span>readln; </span>
<span>end.</span>