Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Self replicating basic code
- #include <iostream> //1 line
- #include <string> //2 line
- using namespace std; //3 line
- //4 line
- int main(int argc, char* argv[]) //5th line
- {
- char q = 34; //7th line
- string l[] = { //8th line ---- code will pause here and will resume later in 3rd for loop
- " ",
- "#include <iostream> //1 line ",
- "#include <string> //2 line ",
- "using namespace std; //3 line ",
- " //4 line ",
- "int main(int argc, char* argv[]) //5th line ",
- "{",
- " char q = 34; //7th line ",
- " string l[] = { //8th line ",
- " }; //9th resume printing end part of code ", //3rd loop starts printing from here
- " for(int i = 0; i < 9; i++) //10th first half code ",
- " cout << l[i] << endl; //11th line",
- " for(int i = 0; i < 18; i++) //12th whole code ",
- " cout << l[0] + q + l[i] + q + ',' << endl; 13th line",
- " for(int i = 9; i < 18; i++) //14th last part of code",
- " cout << l[i] << endl; //15th line",
- " return 0; //16th line",
- "} //17th line",
- }; //9th resume printing end part of code
- for(int i = 0; i < 9; i++) //10th first half code
- cout << l[i] << endl; //11th line
- for(int i = 0; i < 18; i++) //12th whole code
- cout << l[0] + q + l[i] + q + ',' << endl; 13th line
- for(int i = 9; i < 18; i++) //14th last part of code
- cout << l[i] << endl; //15th line
- return 0; //16th line
- } //17th line
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement