vinarsky_evgeny

Untitled

Nov 22nd, 2015
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.44 KB | None | 0 0
  1. { Автор: Винарский Евгений <[email protected]>, 112 гр.}
  2. program t_11_29_a(input,output);
  3. const n=500;
  4. type
  5.   mas=array [1..n] of 0..99;
  6. function rasl(var a: mas): integer;
  7. var i,k: integer; b: array [0..99] of 0..1;
  8.   begin
  9.     k:=0;
  10.     for i:=0 to 99 do
  11.       b[i]:=0;
  12.     for i:=1 to n do
  13.       if(b[a[i]]=0) then
  14.         begin
  15.           k:=k+1;
  16.           b[a[i]]=1;
  17.         end;
  18.     rasl:=k;
  19.   end;
Advertisement
Add Comment
Please, Sign In to add comment