Skip to content

Instantly share code, notes, and snippets.

@pioz
Created December 25, 2014 13:34
Show Gist options
  • Save pioz/02302c3f516bdbc3ee3c to your computer and use it in GitHub Desktop.
Save pioz/02302c3f516bdbc3ee3c to your computer and use it in GitHub Desktop.
Merry Xmas!
#include <stdlib.h>
#include <stdio.h>
int
main()
{int b=63
,l,s,p;for(
int h=0;h<b/2
+1;h++){l=h*2+1
;s=(b-l)/2;for(int
i=0;i<s;i++) printf
(" ");for(int i=0;i<l;
i++){p=rand()%l; printf(
"%c",i==p ?'o':'*');} for(
int i=0;i<s;i++)printf("%c",
rand()%10>7?'.':' ');printf("\n"
);}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment