Skip to main content
added 59 characters in body
Source Link

C, 235 211 208 205 203 198 197 bytes

C, 235 211 208 205 203 198 197 186 bytes

i;ci;x(){for(puts("0");i<37;;i<37;i++){char b[58]="";if(i<21){b[58]="";i<21?memset(b,i%20?i%3&1?35:32:45,56);i<10,i&&i<10?memcpy(b," * * * * * * "+(i%2?0:2),23):0;b[56]=124;}!(i++%20)?memset(b0,b[56]=i%20?124:45,57):0;printf("|%.*s\n",5757s\n",b);}} 

edit: added some of Cool Guy's suggestions and made use of ?: to replace some if statements.

edit: removed overflow \0 prevention and used string length limiter in printf instead.

edit: reworked both memset conditionals.

edit: moved puts("0") inside the for header to remove its semicolon.

edit: slight refactoring to get 11 more bytes.

C, 235 211 208 205 203 198 197 bytes

i;c(){for(puts("0");i<37;){char b[58]="";if(i<21){memset(b,i%3&1?35:32,56);i<10?memcpy(b," * * * * * * "+(i%2?0:2),23):0;b[56]=124;}!(i++%20)?memset(b,45,57):0;printf("|%.*s\n",57,b);}} 

edit: added some of Cool Guy's suggestions and made use of ?: to replace some if statements.

edit: removed overflow \0 prevention and used string length limiter in printf instead.

edit: reworked both memset conditionals.

edit: moved puts("0") inside the for header to remove its semicolon.

C, 235 211 208 205 203 198 197 186 bytes

i;x(){for(puts("0");i<37;i++){char b[58]="";i<21?memset(b,i%20?i%3&1?35:32:45,56),i&&i<10?memcpy(b," * * * * * * "+(i%2?0:2),23):0,b[56]=i%20?124:45:0;printf("|%.57s\n",b);}} 

edit: added some of Cool Guy's suggestions and made use of ?: to replace some if statements.

edit: removed overflow \0 prevention and used string length limiter in printf instead.

edit: reworked both memset conditionals.

edit: moved puts("0") inside the for header to remove its semicolon.

edit: slight refactoring to get 11 more bytes.

deleted 1 character in body
Source Link

C, 235 211 208 205 203 198198 197 bytes

i;c(){for(puts("0");for(;i<37;){char b[58]="";if(i<21){memset(b,i%3&1?35:32,56);i<10?memcpy(b," * * * * * * "+(i%2?0:2),23):0;b[56]=124;}!(i++%20)?memset(b,45,57):0;printf("|%.*s\n",57,b);}} 

edit: added some of Cool Guy's suggestions and made use of ?: to replace some if statements.

edit: removed overflow \0 prevention and used string length limiter in printf instead.

edit: reworked first and secondboth memset conditionals.

edit: moved puts("0") inside the for header to remove its semicolon.

C, 235 211 208 205 203 198 bytes

i;c(){puts("0");for(;i<37;){char b[58]="";if(i<21){memset(b,i%3&1?35:32,56);i<10?memcpy(b," * * * * * * "+(i%2?0:2),23):0;b[56]=124;}!(i++%20)?memset(b,45,57):0;printf("|%.*s\n",57,b);}} 

edit: added some of Cool Guy's suggestions and made use of ?: to replace some if statements.

edit: removed overflow \0 prevention and used string length limiter in printf instead.

edit: reworked first and second memset conditionals.

C, 235 211 208 205 203 198 197 bytes

i;c(){for(puts("0");i<37;){char b[58]="";if(i<21){memset(b,i%3&1?35:32,56);i<10?memcpy(b," * * * * * * "+(i%2?0:2),23):0;b[56]=124;}!(i++%20)?memset(b,45,57):0;printf("|%.*s\n",57,b);}} 

edit: added some of Cool Guy's suggestions and made use of ?: to replace some if statements.

edit: removed overflow \0 prevention and used string length limiter in printf instead.

edit: reworked both memset conditionals.

edit: moved puts("0") inside the for header to remove its semicolon.

added 72 characters in body
Source Link

C, 235 211 208 205 203203 198 bytes

i;c(){puts("0");for(;i<37;){char b[58]="";if(i<21){memset(b,!((i-1)%3)i%3&1?35:32,56);i<10?memcpy(b," * * * * * * "+(i%2?0:2),23):0;b[56]=124;}!(i++%20)?memset(b,45,57):0;printf("|%.*s\n",57,b);}} 

edit: added some of Cool Guy's suggestions and made use of ?: to replace some if statements.

edit: removed overflow \0 prevention and used string length limiter in printf instead.

edit: reworked first and second memset conditionals.

C, 235 211 208 205 203 bytes

i;c(){puts("0");for(;i<37;){char b[58]="";if(i<21){memset(b,!((i-1)%3)?35:32,56);i<10?memcpy(b," * * * * * * "+(i%2?0:2),23):0;b[56]=124;}!(i++%20)?memset(b,45,57):0;printf("|%.*s\n",57,b);}} 

edit: added some of Cool Guy's suggestions and made use of ?: to replace some if statements.

edit: removed overflow \0 prevention and used string length limiter in printf instead.

C, 235 211 208 205 203 198 bytes

i;c(){puts("0");for(;i<37;){char b[58]="";if(i<21){memset(b,i%3&1?35:32,56);i<10?memcpy(b," * * * * * * "+(i%2?0:2),23):0;b[56]=124;}!(i++%20)?memset(b,45,57):0;printf("|%.*s\n",57,b);}} 

edit: added some of Cool Guy's suggestions and made use of ?: to replace some if statements.

edit: removed overflow \0 prevention and used string length limiter in printf instead.

edit: reworked first and second memset conditionals.

added 19 characters in body
Source Link
Loading
added 1 character in body
Source Link
Loading
added 19 characters in body
Source Link
Loading
added 108 characters in body
Source Link
Loading
deleted 24 characters in body
Source Link
Loading
edited body
Source Link
Loading
edited body
Source Link
Loading
Source Link
Loading