Last active
January 3, 2016 06:53
-
-
Save gtaing1/61bd92f12f94ebdf5871 to your computer and use it in GitHub Desktop.
This file contains 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
// Example program | |
#include <iostream> | |
#include <string> | |
int main() | |
{ | |
std::string name; | |
for (int row=1; row<=6;row++) { | |
for (int hash=1; hash<=6-row;hash++) { | |
std::cout<< "#"; | |
} | |
std::cout<< "\n"; | |
} | |
} |
This file contains 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
// Example program | |
#include <iostream> | |
#include <string> | |
int main() | |
{ | |
std::string name; | |
for (int row=1; row<=6;row++) { | |
for (int hash=1; hash<=6-row;hash++) { | |
std::cout<< "#"; | |
} | |
std::cout << 6-row<< "\n"; | |
} | |
} |
This file contains 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 <string> | |
int main() | |
{ | |
std::string name; | |
for (int row=1; row<=6;row++) { | |
for (int hash=1; hash<=4-abs(4-row);hash++) { // | |
std::cout<< "#"; | |
} | |
std::cout << 4-abs(4-row)<< "\n"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment