You are viewing a single comment's thread. Return to all comments →
int main() {
string s; char small[26]={0}; char big[26]={0}; for(int i=0; i<s.length(); i++) { if (s[i] >= 'a' && s[i] <= 'z') { small[s[i] - 'a'] = 1; } else if (s[i] >= 'A' && s[i] <= 'Z') { big[s[i] - 'A'] = 1; } } for(int i=0; i<26; i++) { if(!(big[i]==1 || small[i]==1)) { cout << "not pangram"; return 0; } } cout << "pangram"; return 0;
}
for all the test cases its returning "not pangram".Can you plz help ??
Pangrams
You are viewing a single comment's thread. Return to all comments →
int main() {
}
for all the test cases its returning "not pangram".Can you plz help ??