Last active
August 29, 2015 14:00
-
-
Save lamchau/59173caaf9dc56b2f0a6 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 <algorithm> | |
#include <string> | |
#include <iostream> | |
using namespace std; | |
int main() { | |
// create alphabet (lowercase) | |
char letters[26]; | |
for (int i = 0; i < 26; i++) { | |
letters[i] = 'a' + i; | |
} | |
string str(letters, 26); | |
cout << str << endl; | |
// convert to uppercase | |
transform(str.begin(), str.end(), str.begin(), ::toupper); | |
cout << str << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment