// A string is a pangram if it contains all the characters of the alphabet ignoring case
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <ctype.h>
bool isStringPangram(char str[]) {
int letters[26] = { 0 };
int size = strlen(str);
for (int i = 0; i < size; i++) {
if (isupper(str[i])) {
letters[ str[i] - 'A' ]++;
}
else if (islower(str[i])) {
letters[ str[i] - 'a' ]++;
}
}
for (int i = 0; i < 26; i++) {
if(letters[i] == 0)
return false;
}
return true;
}
int main()
{
char str[] = "The quick brown fox jumps over the lazy dog";
if (isStringPangram(str) == true)
puts("string is a Pangram");
else
puts("string is not a Pangram");
return 0;
}
/*
run:
string is a Pangram
*/