Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest May 16th, 2018 105 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. Uses crt;
  2. Const
  3. N = 5;
  4. var
  5. a:array[1..N] of integer;
  6. i,k,p:integer;
  7. begin
  8.       for i:=1 to N do readln(a[i]);
  9.      
  10.      
  11.       for i:=1 to N-1 do
  12.       begin
  13.             if(a[i]*a[i+1] mod 2 = 0) and (a[i]*a[i+1] > 0) then
  14.             begin
  15.                 k := k + 1;
  16.             end;
  17.       end;
  18.      
  19.       writeln(k);
  20.       readkey;
  21. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top