Created
October 21, 2012 07:46
-
-
Save matancev/3926259 to your computer and use it in GitHub Desktop.
This code prints a man!
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> | |
| #include <cstdlib> | |
| #include <iomanip> | |
| using namespace std; | |
| void printS(int); | |
| int main() | |
| { | |
| //Голова | |
| cout << setw(30); printS(6); | |
| cout << "\n" << setw(29); printS(8); | |
| cout << "\n" << setw(28); printS(10); | |
| cout << "\n" << setw(27); printS(12); | |
| cout << "\n" << setw(26); printS(14); | |
| cout << "\n" << setw(26); printS(14); | |
| cout << "\n" << setw(27); printS(12); | |
| cout << "\n" << setw(28); printS(10); | |
| cout << "\n" << setw(29); printS(8); | |
| //Шея | |
| cout << "\n" << setw(31); printS(4); | |
| cout << "\n" << setw(31); printS(4); | |
| //Туловище | |
| cout << "\n" << setw(24); printS(18); | |
| cout << "\n" << setw(23); printS(4); cout << "#"; printS(9); | |
| cout << "#"; printS(5); | |
| cout << "\n" << setw(22); printS(4); cout << " "; printS(9); | |
| cout << " "; printS(4); | |
| cout << "\n" << setw(21); printS(4); cout << " "; printS(9); | |
| cout << " "; printS(4); | |
| cout << "\n" << setw(20); printS(4); cout << " "; printS(9); | |
| cout << " "; printS(4); | |
| cout << "\n" << setw(20); printS(3); cout << " "; printS(9); | |
| cout << " "; printS(3); | |
| cout << "\n" << setw(20); printS(3); cout << " "; printS(9); | |
| cout << " "; printS(3); | |
| cout << "\n" << setw(20); printS(3); cout << " "; printS(9); | |
| cout << " "; printS(3); | |
| cout << "\n" << setw(20); printS(3); cout << " "; printS(9); | |
| cout << " "; printS(3); | |
| cout << "\n" << setw(20); printS(3); cout << " "; printS(9); | |
| cout << " "; printS(3); | |
| //Ноги | |
| cout << "\n" << setw(28); printS(9); | |
| cout << "\n" << setw(27); printS(4); cout << " "; printS(4); | |
| cout << "\n" << setw(26); printS(4); cout << " "; printS(4); | |
| cout << "\n" << setw(25); printS(4); cout << " "; printS(4); | |
| cout << "\n" << setw(24); printS(4); cout << " "; printS(4); | |
| cout << "\n" << setw(24); printS(4); cout << " "; printS(4); | |
| cout << "\n" << setw(24); printS(4); cout << " "; printS(4); | |
| cout << "\n" << setw(24); printS(4); cout << " "; printS(4); | |
| cout << "\n" << setw(24); printS(4); cout << " "; printS(4); | |
| cout << "\n" << setw(24); printS(4); cout << " "; printS(4); | |
| cout << "\n" << setw(24); printS(4); cout << " "; printS(4); | |
| cout << "\n" << setw(24); printS(4); cout << " "; printS(4); | |
| cout << endl; | |
| system("pause"); | |
| return 0; | |
| } | |
| void printS(int n) | |
| { | |
| static bool one = false; | |
| for(int i = 0; i < n; i++) | |
| { | |
| if(one) | |
| cout << "1"; | |
| else cout << "0"; | |
| one = !(one); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment