Created
April 6, 2010 23:15
-
-
Save Raynes/358257 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| char x[27]; | |
| char c = 'a'; | |
| int main() | |
| { | |
| for (int i = 0; i < 26; i++) { | |
| x[i] = c; | |
| c++; | |
| } | |
| string str; | |
| cout << "Please enter a string: "; | |
| cin >> str; | |
| bool pangram; | |
| size_t found; | |
| for(int i = 0; i < 26; i++) { | |
| found = str.find(x[i]); | |
| if (found != string::npos){ | |
| pangram = true; | |
| } | |
| else { | |
| cout << x[i]; | |
| pangram = false; | |
| break; | |
| } | |
| } | |
| if(pangram == 0) | |
| cout << "String is not a pangram."; | |
| else | |
| cout << "String is indeed a pangram."; | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment