gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
moved version.properties to a class subfolder to prevent conflicts
[mjc2wsl.git] / samples / eratos.mj
index 620bd2d..92d28f8 100644 (file)
@@ -7,7 +7,11 @@ program Eratos
 {\r
        void put(int x)\r
        {\r
-               if (npp == 10) {print(chr(13)); print(chr(10)); npp = 0;}\r
+               if (npp == 10) {\r
+                       print(chr(13)); \r
+                       print(chr(10)); \r
+                       npp = 0;\r
+               }\r
                print(x, 5);\r
                npp++;\r
        }\r
@@ -17,7 +21,9 @@ program Eratos
        {\r
                put(x);\r
                i = x;\r
-               while (i <= max) {sieve[i] = 'o'; i = i + x;}\r
+               while (i <= max) {\r
+                       sieve[i] = 'o'; i = i + x;\r
+               }\r
        }\r
 \r
        void main()\r
@@ -27,11 +33,14 @@ program Eratos
                npp = 0;\r
                sieve = new char[max+1];\r
                i = 0;\r
-               while (i <= max) {sieve[i] = 'x'; i++;}\r
+               while (i <= max) {\r
+                       sieve[i] = 'x'; i++;\r
+               }\r
                i = 2;\r
                while (i <= max) {\r
                        found(i);\r
-                       while(i <= max && sieve[i] == 'o') i++;\r
+                       while(i <= max && sieve[i] == 'o') \r
+                               i++;\r
                }\r
        }\r
 \r
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner