Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Program Task_5;
- Var
- a : array [1..10000] of integer;
- i,n, sum: integer;
- check : boolean;
- Begin
- sum:=0;
- read(n);
- check:=false;
- for i := 1 to n do
- read(a[i]);
- for i := 2 to n do
- begin
- if ((a[i-1] > 0) and (a[i] > 0)) then
- check := true;
- if ((a[i-1] < 0) and (a[i] <0)) then
- check := true;
- end;
- if (check = true) then
- write('YES')
- else
- write('NO');
- End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement