Pangram checker: Difference between revisions
Content deleted Content added
Adding a second example for Mathematica |
PatGarrett (talk | contribs) →{{header|360 Assembly}}: Section added*/ |
||
Line 6:
A pangram is a sentence that contains all the letters of the English alphabet
at least once, for example: ''The quick brown fox jumps over the lazy dog''.
=={{header|360 Assembly}}==
<lang 360asm>
* Pangram RC PG - 11/08/2015
PANGRAM CSECT assist plig\PANGRAM
USING PANGRAM,R12
LR R12,R15
BEGIN LA R9,SENTENCE
LA R6,4
LOOPI LA R10,ALPHABET loop on sentences
LA R7,26
LOOPJ LA R5,0 loop on letters
LR R11,R9
LA R8,60
LOOPK MVC BUFFER+1(1),0(R10) loop in sentence
CLC 0(1,R10),0(R11) if alphabet[j=sentence[i]
BNE NEXTK
LA R5,1 found
NEXTK LA R11,1(R11) next character
BCT R8,LOOPK
LTR R5,R5 if found
BNZ NEXTJ
MVI BUFFER,C'?' not found
B PRINT
NEXTJ LA R10,1(R10) next letter
BCT R7,LOOPJ
MVC BUFFER(2),=CL2'OK'
PRINT MVC BUFFER+3(60),0(R9)
XPRNT BUFFER,80
NEXTI LA R9,60(R9) next sentence
BCT R6,LOOPI
RETURN XR R15,R15
BR R14
ALPHABET DC CL26'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
SENTENCE DC CL60'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.'
DC CL60'THE FIVE BOXING WIZARDS DUMP QUICKLY.'
DC CL60'HEAVY BOXES PERFORM WALTZES AND JIGS.'
DC CL60'PACK MY BOX WITH FIVE DOZEN LIQUOR JUGS.'
BUFFER DC CL80' '
YREGS
END PANGRAM assist plig\PANGRAM
</lang>
{{out}}
<pre>
OK THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.
?J THE FIVE BOXING WIZARDS DUMP QUICKLY.
?C HEAVY BOXES PERFORM WALTZES AND JIGS.
OK PACK MY BOX WITH FIVE DOZEN LIQUOR JUGS.
</pre>
=={{header|ACL2}}==
|