You are viewing a single comment's thread. Return to all comments →
In C++
string pangrams(string s) { string low = "abcdefghijklmnopqrstuvwxyz"; vector<bool> checker(26, false); for (int i = 0; i < s.size(); i++) { for (int j = 0; j < low.size(); j++) { if (isalpha(s[i])) { if (tolower(s[i]) == low[j]) { checker[j] = true; break; } } } } for (int j = 0; j < 26; j++) { if (checker[j] == false) return "not pangram"; } return "pangram"; }
Seems like cookies are disabled on this browser, please enable them to open this website
Pangrams
You are viewing a single comment's thread. Return to all comments →
In C++