Advertisement
ProToTN

CountXT Function

Jan 20th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.21 KB | None | 0 0
  1. Function CountXT(X,N:Integer;T:Tab):Integer; {X:An integer we're looking for; N:Size of T(Array)}
  2. Var i,j:Byte;
  3. Begin
  4.   j=0;
  5.   For i:=1 to N do
  6.   Begin
  7.     if T[i]=X then j:=j+1;
  8.   End;
  9.   CountXT:=J
  10. End;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement