From: Doni Pracner Date: Wed, 12 Feb 2014 11:14:41 +0000 (+0100) Subject: polinoml - dodat MaksimalniStepen X-Git-Tag: v14a~8^2~15 X-Git-Url: https://svarog.pmf.uns.ac.rs/gitweb/?a=commitdiff_plain;h=11f623923fc51d8532dbfb89f151180678e97847;p=spa1skripta-public.git polinoml - dodat MaksimalniStepen --- 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;