Skip to content

Instantly share code, notes, and snippets.

@antirez
Created December 24, 2014 18:48
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antirez/2298640095f972d1a6d0 to your computer and use it in GitHub Desktop.
Save antirez/2298640095f972d1a6d0 to your computer and use it in GitHub Desktop.
Happy xmas!
#include <stdio.h>
#include <stdlib.h>
int
main()
{int h=9,
d=0,x;while
(h--){for(x=0;
x<39;x++){int a=x
-6;if(a<0)a=-a;printf
("%c", (a <= d) ? '*':((
float)rand()/RAND_MAX<(.3/(h
+1))?'.':' '));}printf("\n");d++;}}
@briceburg
Copy link

      *              .                 
     ***              .                
    *****                              
   *******                             
  *********.                   .      .
 ***********..                     .   
*************           .        .     
**************   .       .           . 
***************    .     .   . ..  ..  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment