gitweb on Svarog
projekti pod git sistemom za održavanje verzija -- projects under the git version control system
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ba29af5)
raw | patch | inline | side by side (parent: ba29af5)
author | Doni Pracner <quinnuendo@gmail.com> | |
Wed, 12 Feb 2014 11:07:13 +0000 (12:07 +0100) | ||
committer | Doni Pracner <quinnuendo@gmail.com> | |
Wed, 12 Feb 2014 11:09:57 +0000 (12:09 +0100) |
kodovi/polinomi/testpoli.MOD | [new file with mode: 0644] | patch | blob |
diff --git a/kodovi/polinomi/testpoli.MOD b/kodovi/polinomi/testpoli.MOD
--- /dev/null
@@ -0,0 +1,110 @@
+MODULE testpoli;\r
+FROM PolinomL IMPORT Polinom, Stampaj, Anuliraj,\r
+ DisposePolinom, PostaviClan, Kopiraj;\r
+FROM InOut IMPORT WriteString, WriteLn;\r
+\r
+VAR\r
+ q,q2 : Polinom;\r
+\r
+BEGIN\r
+ (* korisnik unosi prvi polinom *)\r
+ WriteString("Unesite polinom:");\r
+ WriteLn;\r
+ Anuliraj(q);\r
+ (* postavimo clan x^5 *)\r
+ PostaviClan(1.0,5,q);\r
+ (* -3 x^4 *)\r
+ PostaviClan(-3.0,4,q);\r
+ (* 4 x *)\r
+ PostaviClan(4.0,1,q);\r
+ (* 7 (x^0) *)\r
+ PostaviClan(7.0,0,q);\r
+ \r
+ WriteString("q: ");WriteLn;\r
+ Stampaj(q,0);\r
+ WriteLn;\r
+\r
+ WriteString("dodaj u sredinu");\r
+ WriteLn;\r
+ PostaviClan(2.0,2,q);\r
+ Stampaj(q,0);\r
+ WriteLn;\r
+\r
+ WriteString("nula prvi");\r
+ WriteLn;\r
+ PostaviClan(0.0,5,q);\r
+ Stampaj(q,0);\r
+ WriteLn;\r
+\r
+ WriteString("nula poslednji");\r
+ WriteLn;\r
+ PostaviClan(0.0,0,q);\r
+ Stampaj(q,0);\r
+ WriteLn;\r
+ \r
+ WriteString("nula sredina");\r
+ WriteLn;\r
+ PostaviClan(0.0,2,q);\r
+ Stampaj(q,0);\r
+ WriteLn;\r
+\r
+ WriteString("nula nepostojeci");\r
+ WriteLn;\r
+ PostaviClan(0.0,2,q);\r
+ Stampaj(q,0);\r
+ WriteLn;\r
+\r
+ WriteString("postavi prvi");\r
+ WriteLn;\r
+ PostaviClan(7.0,7,q);\r
+ Stampaj(q,0);\r
+ WriteLn;\r
+\r
+ WriteString("postavi poslednji");\r
+ WriteLn;\r
+ PostaviClan(7.0,1,q);\r
+ Stampaj(q,0);\r
+ WriteLn;\r
+\r
+ Kopiraj(q,q2);\r
+\r
+ WriteString("dodaj srednji u listu duzine 2");\r
+ WriteLn;\r
+ PostaviClan(11.0,3,q);\r
+ Stampaj(q,0);\r
+ WriteLn;\r
+\r
+ Kopiraj(q2,q);\r
+ WriteString("obrisi prvi iz liste duzine 2");\r
+ WriteLn;\r
+ PostaviClan(0.0,7,q);\r
+ Stampaj(q,0);\r
+ WriteLn;\r
+\r
+ WriteString("obrisi prvi iz liste duzine 1");\r
+ WriteLn;\r
+ PostaviClan(0.0,1,q);\r
+ Stampaj(q,0);\r
+ WriteLn;\r
+\r
+ Kopiraj(q2,q);\r
+ WriteString("obrisi poslednji iz liste duzine 2");\r
+ WriteLn;\r
+ PostaviClan(0.0,1,q);\r
+ Stampaj(q,0);\r
+ WriteLn;\r
+\r
+ WriteString("obrisi poslednji iz liste duzine 1");\r
+ WriteLn;\r
+ PostaviClan(0.0,7,q);\r
+ Stampaj(q,0);\r
+ WriteLn;\r
+\r
+ WriteString("nuliranje u listi duzine 0");\r
+ WriteLn;\r
+ PostaviClan(0.0,7,q);\r
+ Stampaj(q,0);\r
+ WriteLn;\r
+\r
+ DisposePolinom(q);\r
+END testpoli.\r