Advertisement
ridjis

smanjiStepenZaSt

May 14th, 2014
408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. // Smanjuje stepene monoma za uneto 'st'
  2. PROCEDURE SmanjiZa (st:CARDINAL;p:Polinom;VAR rez:Polinom);
  3. VAR temp,tek:Polinom;
  4. BEGIN
  5. Anuliraj(rez);
  6. IF (p#NIL) THEN
  7. Kopiraj(p,rez);
  8. IF (st#0) THEN
  9. temp:=rez;
  10. tek:=NIL;
  11. WHILE (temp # NIL) AND (temp^.st >= st) DO
  12. temp^.st:= temp^.st - st;
  13. tek:=temp;
  14. temp:=temp^.veza;
  15. END;
  16. IF temp#NIL THEN
  17. tek^.veza:=NIL;
  18. DisposePolinom(temp);
  19. END;
  20. END;
  21. END;
  22. END SmanjiZa;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement