Jump to content

Pangram checker: Difference between revisions

m
→‎{{header|REXX}}: changed program to show all missing letters (if any), as suggested by Walter Pachl.
m (→‎{{header|REXX}}: used a template for the output.)
m (→‎{{header|REXX}}: changed program to show all missing letters (if any), as suggested by Walter Pachl.)
Line 2,097:
@abc= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' /*a list of all (Latin) capital letters*/
 
do forever; say /*keep promoting 'til null (or blanks).*/
say
say '──────── Please enter a pangramic sentence (or a blank to quit):'; say
say
pull y /*this also uppercases the Y variable.*/
if y='' then leave /*if nothing entered, then we're done.*/
 
?=verify(@abc, y) /*Are all the (Latin) letters present? */
absent= space( translate( @abc, , y), 0) /*obtain a list of any absent letters. */
if ?==0 then say '──────── Sentence is a pangram.'
 
else say "──────── Sentence isn't a pangram, missing:" substr(@abc, ?, 1)
if ?absent==0'' then say '──────── Sentence is a pangram.'
else say "──────── Sentence isn't a pangram, missing: " substr(@abc, ?, 1)absent
say
end /*forever*/
Line 2,113 ⟶ 2,117:
 
The quick brown fox jumped over the lazy dog. ◄■■■■■■■■■■ user input.
──────── Sentence isn't a pangram, missing: S
 
 
Cookies help us deliver our services. By using our services, you agree to our use of cookies.