Created
January 24, 2021 03:07
-
-
Save dennisliuu/14c23cc7aaa28f00817bf3253d27e851 to your computer and use it in GitHub Desktop.
Sierpinski_triangle
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> | |
using namespace std; | |
int main(){ | |
for(int x=0;x<300;x++){ | |
for(int y=0;y<300;y++){ | |
cout<<(x+y-150 & x-y+150?" ":"#"); | |
} | |
cout<<endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment