daily pastebin goal
49%
SHARE
TWEET

Untitled

a guest May 16th, 2018 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Uses crt;
  2. Const
  3. N = 5;
  4. var
  5. a:array[1..N] of integer;
  6. i,j,k:integer;
  7. begin
  8.       for i:=1 to N do readln(a[i]);
  9.       k:=1;
  10.       for i:=1 to N do
  11.       begin
  12.             if(a[i] mod 2 <> 0) and (a[i] > 0) then
  13.             begin
  14.                   k:=k*a[i];
  15.             end;
  16.       end;
  17.      
  18.       writeln(k);
  19.      
  20.      
  21.       readkey;
  22. end.
RAW Paste Data
Top