Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
24
Task/Pangram-checker/Seed7/pangram-checker.seed7
Normal file
24
Task/Pangram-checker/Seed7/pangram-checker.seed7
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
$ include "seed7_05.s7i";
|
||||
|
||||
const func boolean: isPangram (in string: stri) is func
|
||||
result
|
||||
var boolean: isPangram is FALSE;
|
||||
local
|
||||
var char: ch is ' ';
|
||||
var set of char: usedChars is (set of char).value;
|
||||
begin
|
||||
for ch range lower(stri) do
|
||||
if ch in {'a' .. 'z'} then
|
||||
incl(usedChars, ch);
|
||||
end if;
|
||||
end for;
|
||||
isPangram := usedChars = {'a' .. 'z'};
|
||||
end func;
|
||||
|
||||
const proc: main is func
|
||||
begin
|
||||
writeln(isPangram("This is a test"));
|
||||
writeln(isPangram("The quick brown fox jumps over the lazy dog"));
|
||||
writeln(isPangram("NOPQRSTUVWXYZ abcdefghijklm"));
|
||||
writeln(isPangram("abcdefghijklopqrstuvwxyz")); # Missing m, n
|
||||
end func;
|
||||
Loading…
Add table
Add a link
Reference in a new issue