Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Maxdigit(var L: list): integer;
- var Max1:Integer;
- function Max2(x1,x2:integer): integer;
- begin
- if (x1>=x2) then
- Max2:=x1
- else
- Max2:=x2;
- end;
- begin
- if (L<>nil) then
- if (L^.next=nil) then
- Maxdigit:=l^.elem
- else
- Maxdigit:=max2(L^.elem,Maxdigit(L^.next));
- end;
Advertisement
Add Comment
Please, Sign In to add comment