Last active
December 24, 2018 15:51
-
-
Save Matrixbirds/e00aac9927efc6941af89fd1e29ce221 to your computer and use it in GitHub Desktop.
Merry-Christmas.cxx
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> | |
using namespace std; | |
/********* Merry Christmas :P *******/ | |
int | |
main(){ | |
int a | |
; | |
cin | |
>>a;int | |
w=a*2+5;for | |
(int x= | |
0;x<a;++x){ | |
for(int y=2;y>= | |
0;--y){for(int z=0; | |
z<a+y-x;++z | |
){cout<<" ";}for( | |
int z=0;z<x*2-y*2+5;++z | |
){cout<<".";}cout | |
<<endl;}}for(int x=0; | |
x<w/5+1;++x){for(int z=0; | |
z<w/3+1;++z){cout<<" ";}for( | |
int z=0; z<w-(w/3+1)*2;z+=1){cout | |
<<"#";}cout | |
<<endl;;;}} | |
// g++ -o obj ./christmas_tree.cxx |
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> | |
using namespace std; | |
/********* Merry Christmas :P *******/ | |
int | |
main(){ | |
int a | |
; | |
cin | |
>>a;int | |
w=a*2+5;for | |
(int x= | |
0;x<a;++x){ | |
for(int y=2;y>= | |
0;--y){for(int z=0; | |
z<a+y-x;++z | |
){cout<<" ";}for( | |
int z=0;z<x*2-y*2+5;++z | |
){cout<<"🎄";}cout | |
<<endl;}}for(int x=0; | |
x<w/5+1;++x){for(int z=0; | |
z<w/3+1;++z){cout<<" ";}for( | |
int z=0; z<w-(w/3+1)*2;z+=1){cout | |
<<"🐰";}cout | |
<<endl;;;}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment