Created
October 11, 2020 06:01
-
-
Save d351d3r/028f5fee6d059b8cdf5d7655482d0317 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 <iostream> | |
| #include <locale> | |
| #include <string> | |
| #include <cstring> | |
| int strlen(char *s); | |
| using namespace std; | |
| int main() { | |
| const char *s = "Just "; | |
| char v = '\0'; | |
| int l = strlen(s); | |
| for (int i = 0; i < 1 << l; i++) { | |
| for (int j = 0; j < l; j++) { | |
| if (j != 4) { | |
| if (i & (1 << j)) v = toupper(s[j]); else v = tolower(s[j]); | |
| cout << v; | |
| } | |
| } | |
| cout << endl; | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment