Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  1
Language: PASCAL
Code:
program posl;
const n=1000;
var a:array[1..n]of longint;
i,r,k:longint;
begin
writeln('vvedite razmer posledovatelnosti');
readln(r);
writeln('vvedite posledovatelnost');
for i:=1 to r do
readln(a[i]);
for i:=1 to r do
begin
if (a[i]=1) and (a[i+1]=2) then
inc(k);
end;
writeln('posledovatelnost vstrechaetsya ',k,'raz(a)');
end.
          
Comments: