From 11f623923fc51d8532dbfb89f151180678e97847 Mon Sep 17 00:00:00 2001 From: Doni Pracner Date: Wed, 12 Feb 2014 12:14:41 +0100 Subject: [PATCH] polinoml - dodat MaksimalniStepen --- kodovi/polinomi/POLINOML.DEF | 1 + kodovi/polinomi/POLINOML.MOD | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/kodovi/polinomi/POLINOML.DEF b/kodovi/polinomi/POLINOML.DEF index da9ff34..e11f4ce 100644 --- a/kodovi/polinomi/POLINOML.DEF +++ b/kodovi/polinomi/POLINOML.DEF @@ -17,6 +17,7 @@ PROCEDURE Kopiraj(p: Polinom; PROCEDURE PostaviClan(k: REAL; st:CARDINAL; VAR p:Polinom); PROCEDURE KoeficijentUz(p:Polinom; st:CARDINAL):REAL; +PROCEDURE MaksimalniStepen(p:Polinom):CARDINAL; PROCEDURE UbaciMonom(mon:Polinom; VAR p: Polinom); PROCEDURE PromeniZnak(VAR p: Polinom); diff --git a/kodovi/polinomi/POLINOML.MOD b/kodovi/polinomi/POLINOML.MOD index 4bc9ce6..fb6db76 100644 --- a/kodovi/polinomi/POLINOML.MOD +++ b/kodovi/polinomi/POLINOML.MOD @@ -131,6 +131,15 @@ BEGIN END; END KoeficijentUz; +PROCEDURE MaksimalniStepen(p:Polinom):CARDINAL; +BEGIN + IF p#NIL THEN + RETURN p^.st; + ELSE + RETURN 0; + END; +END MaksimalniStepen; + PROCEDURE UbaciMonom(mon:Polinom; VAR p: Polinom); VAR stari, tekuci, kopija: Polinom; -- 2.25.1