Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
program Pangram;
var
i: integer;
BoolArray: array [1..26] of boolean;
IsPangram: boolean;
Input:string;
begin
writeln('Enter a string');
readln(Input);
Input:=lowercase(Input);
for i:=1 to 26 do
BoolArray[i]:=false;
for i:=0 to length(Input) do
if (((ord(Input[i])-96)<27) and ((ord(Input[i])-96)>0)) then
BoolArray[ord(Input[i])-96] := true;
IsPangram:=true;
for i:=1 to 26 do
if BoolArray[i]=false then
IsPangram:=false;
if IsPangram then
writeln('Pangram')
else
writeln('Not Pangram');
readln;
end.
Advertisements
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.
AcceptLearn more