Solve hanging lantern problem: Difference between revisions
Content added Content deleted
(J) |
m (→{{header|J}}) |
||
Line 198: | Line 198: | ||
pedantic 3, 1 3 3 |
pedantic 3, 1 3 3 |
||
140</lang> |
140</lang> |
||
If we wanted to impose even more overhead, we could insist that the numbers be read from a file where tabs, spaces and newlines are all treated equivalently. For that, we must specify the file name and implement some parsing: |
|||
<lang J>yetmoreoverhead=: {{ |
|||
pedantic ({.~ 1+{.) _ ". rplc&(TAB,' ',LF,' ') fread y |
|||
}}</lang> |
|||
Examples of this approach are left as an exercise for the user. |
|||
==={{header|QBasic}}=== |
==={{header|QBasic}}=== |