summaryrefslogtreecommitdiff
path: root/prolog/problems/dcg/number_3/en.py
blob: 6516db7c6160f1bcafc7dbd6153079061603f113 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# coding=utf-8

name = 'number/3'
slug = 'numbers with meaning'

description = '''\
<p>Write a DCG with the starting symbol <code>number</code> for the language of non-negative integers. The numbers may contain leading zeros. The meaning of a word in this language is the numeric value of the represented number.</p>
<pre>
?- number(N, [1,2,3,4], []).
  N = 1234.
</pre>
'''

hint = {}