Jewels and stones: Difference between revisions
add ABC
Not a robot (talk | contribs) (Add Refal) |
Not a robot (talk | contribs) (add ABC) |
||
Line 388:
Result: 0
</pre>
=={{header|ABC}}==
<syntaxhighlight lang="abc">HOW TO RETURN stones count.in jewels:
PUT 0 IN count
FOR stone IN stones:
IF stone in jewels: PUT count+1 IN count
RETURN count
WRITE "aAAbbbb" count.in "aA"/
WRITE "ZZ" count.in "z"/</syntaxhighlight>
{{out}}
<pre>3
0</pre>
=={{header|Ada}}==
<syntaxhighlight lang="ada">with Ada.Text_IO;
|