Execute HQ9+: Difference between revisions

Content added Content deleted
(Add CLU)
(add bqn)
Line 611: Line 611:
hq9+HqQ+Qq
hq9+HqQ+Qq
</pre>
</pre>


=={{header|BQN}}==
'''Works in:''' [[CBQN]]
Takes a single line HQ9+ program from stdin, and displays the output.

<lang bqn>Pl ← {(𝕩≠1)/"s"}
Lwr ← +⟜(32×1="A["⊸⍋)
nn ← {(•Fmt 𝕨)∾" "∾𝕩}´¨∾{
⟨𝕩,"bottle"∾(Pl 𝕩)∾" of beer on the wall"⟩
⟨𝕩,"bottle"∾(Pl 𝕩)∾" of beer"⟩
⟨"Take one down, pass it around"⟩
⟨𝕩-1,"bottle"∾(Pl 𝕩-1)∾" of beer on the wall"⟩
}¨⌽1+↕99

HQ9 ← {
out ← ⟨⟨"Hello, World!"⟩, ⟨𝕩⟩, nn⟩
acc ← +´'+'=𝕩
∾out⊏˜3⊸≠⊸/"hq9"⊐Lwr 𝕩
}

•Out¨HQ9 •GetLine@</lang>


=={{header|C}}==
=={{header|C}}==