How to resolve the algorithm Pangram checker step by step in the REXX programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Pangram checker step by step in the REXX programming language

Table of Contents

Problem Statement

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.

Write a function or method to check a sentence to see if it is a   pangram   (or not)   and show its use.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Pangram checker step by step in the REXX programming language

Source code in the rexx programming language

/*REXX program  verifies  if an  entered/supplied  string  (sentence)  is a pangram.    */
@abc= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'               /*a list of all (Latin) capital letters*/

    do forever;    say                           /*keep promoting 'til null (or blanks).*/
    say '──────── Please enter a pangramic sentence   (or a blank to quit):';      say
    pull y                                       /*this also uppercases the  Y variable.*/
    if y=''  then leave                          /*if nothing entered,  then we're done.*/
    absent= space( translate( @abc, , y), 0)     /*obtain a list of any absent letters. */
    if absent==''  then say  "──────── Sentence is a pangram."
                   else say  "──────── Sentence isn't a pangram, missing: "    absent
    say
    end   /*forever*/

say '──────── PANGRAM program ended. ────────'   /*stick a fork in it,  we're all done. */


  

You may also check:How to resolve the algorithm Population count step by step in the CLU programming language
You may also check:How to resolve the algorithm Pascal's triangle/Puzzle step by step in the Java programming language
You may also check:How to resolve the algorithm Perfect numbers step by step in the Icon and Unicon programming language
You may also check:How to resolve the algorithm Ethiopian multiplication step by step in the CLU programming language
You may also check:How to resolve the algorithm Doubly-linked list/Element insertion step by step in the Swift programming language