Skip to content

Instantly share code, notes, and snippets.

@dennisliuu
Created January 24, 2021 03:07
Show Gist options
  • Save dennisliuu/14c23cc7aaa28f00817bf3253d27e851 to your computer and use it in GitHub Desktop.
Save dennisliuu/14c23cc7aaa28f00817bf3253d27e851 to your computer and use it in GitHub Desktop.
Sierpinski_triangle
# 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