vinarsky_evgeny

Untitled

Nov 29th, 2015
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.35 KB | None | 0 0
  1. {Винарский 16_19_а}
  2. type
  3. str=packed array [1..10] of char;
  4. list=^node;
  5. node=record
  6.       elem: str;
  7.       next: list
  8.      end;
  9.  
  10. function kol(L: list): integer;
  11. var k: integer; p: list;
  12.   begin
  13.     k:=0;
  14.     while(L<>nil) do
  15.       begin
  16.         if(L^.elem[1]=L^.elem[10]) then k:=k+1;
  17.         L:=L^.next;
  18.       end;
  19.    kol:=k;
  20.   end;
Advertisement
Add Comment
Please, Sign In to add comment