SHARE
TWEET

Untitled

a guest Apr 25th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program ggwp;
  2. const  n = 10;
  3. var  a :array [1..n] of integer;
  4. i, p :integer;
  5. begin
  6.   randomize;
  7.   for i:= 1 to n do  
  8.    a[i]:= random(20);
  9.    p:= 0;
  10.   for i:= 1 to n do  
  11.    if not odd(i) and odd(a[i]) then    
  12.     p:= p + 1;
  13.   for i:= 1 to n do  
  14.    write(a[i],' ');
  15.    writeln;
  16.    writeln(p);
  17. 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