summaryrefslogtreecommitdiff
path: root/prolog/problems/clp_fd/tobase_3
diff options
context:
space:
mode:
Diffstat (limited to 'prolog/problems/clp_fd/tobase_3')
-rw-r--r--prolog/problems/clp_fd/tobase_3/sl.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/prolog/problems/clp_fd/tobase_3/sl.py b/prolog/problems/clp_fd/tobase_3/sl.py
new file mode 100644
index 0000000..a775808
--- /dev/null
+++ b/prolog/problems/clp_fd/tobase_3/sl.py
@@ -0,0 +1,17 @@
+# coding=utf-8
+
+name = 'tobase/3'
+slug = 'Pretvori števila v/iz desetiškega sistema'
+
+description = '''\
+<p><code>tobase(Number, B, X)</code>: število <code>Number</code> je v desetiškem sistemu. <code>X</code> predstavlja to število v sistemu z bazo <code>B</code>. Implementiraj predikat z uporabo omejitev. Omeji vrednost <code>B</code> na interval [2..10].</p>
+<pre>
+ ?- tobase(42, 2, X).
+ X = 101010.
+ ?- tobase(N, 2, 101010).
+ N = 42.
+ ?- tobase(42, B, 101010).
+ B = 2.
+</pre>'''
+
+hint = {}