Created
June 2, 2015 18:35
-
-
Save ntnn/8112b119c77d7a791a18 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; | |
int main() { | |
char quote = (char) 34; | |
char comma = (char) 44; | |
string code[] = { | |
"#include <iostream>", | |
"using namespace std;", | |
"int main() {", | |
" char quote = (char) 34;", | |
" char comma = (char) 44;", | |
" string code[] = {", | |
" };", | |
" for (int i = 0; i < 6; ++i) {", | |
" cout << code[i] << endl;", | |
" }", | |
" for (int i = 0; i < 18; ++i) {", | |
" cout << quote << code[i] << quote << comma << endl;", | |
" }", | |
" for (int i = 6; i < 18; ++i) {", | |
" cout << code[i] << endl;", | |
" }", | |
" return 0;", | |
"}" | |
}; | |
for (int i = 0; i < 6; ++i) { | |
cout << code[i] << endl; | |
} | |
for (int i = 0; i < 18; ++i) { | |
cout << quote << code[i] << quote << comma << endl; | |
} | |
for (int i = 6; i < 18; ++i) { | |
cout << code[i] << endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment