SlepoiKrot

Untitled

Feb 7th, 2018
94
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program it;
  2.  
  3. {$APPTYPE CONSOLE}
  4.  
  5. uses
  6.   SysUtils;
  7. var
  8.   n, a, b, i, j: integer;
  9.   ci: array [1..1000] of integer;
  10. begin
  11.   assign(input, 'input.txt');
  12.   reset(input);
  13.   assign(output, 'output.txt')
  14.   rewrite(output);
  15.   readln (n);
  16.   for i := 1 to n do begin
  17.     read (ci[i]);
  18.   end;
  19.   read (a, b);
  20.   j := 0;
  21.   for i := 1 to n do begin
  22.     if (ci[i] > a) and (ci[i] <= b) then
  23.       inc (j);
  24.   end;
  25.   writeln (j);
  26.   close(input);
  27.   close(output);
  28. end.
RAW Paste Data