Increment a numerical string: Difference between revisions
→dc: add
(→dc: add) |
|||
Line 1,248:
assert(s == "12350");
}</syntaxhighlight>
=={{header|dc}}==
<syntaxhighlight lang="dc">? 1 + p</syntaxhighlight>
The program expects a string on ''stdin'':
<syntaxhighlight lang="sh">echo '12345678899' | dc inc.dc</syntaxhighlight>
{{out}}
<pre>12345678900</pre>
=={{header|Delphi}}==
|