Anonymous user
Odd words: Difference between revisions
m
→version 2, caseless: adjusted the record count.
(Added Java solution) |
m (→version 2, caseless: adjusted the record count.) |
||
Line 713:
$.#= x; upper x; @.x= . /*save: original case and the semaphore*/
end /*#*/ /* [↑] semaphore name is uppercased. */
#= # - 1
minW= minL * 2 - 1 /*minimum width of a word to be usable.*/
say copies('─', 30) # "words in the dictionary file: " iFID
ows= 0 /*count of the "odd words" found. */
do j=1 for #
if L<minW then iterate /*Is word too short? Then ignore it. */
ow= /*initialize the "odd word". */
Line 727 ⟶ 728:
say right(left($.j, 20), 24) left(ow, 9) /*indent original word for readability.*/
end /*j*/
say copies('─', 30) ows ' "odd words" found with a minimum length of ' minL
</lang>
{{out|output|text= when using the default input:}}
<pre>
──────────────────────────────
barbarian brain
childbear cider
|