Skip to main content
Commonmark migration
Source Link

#C, 169

C, 169

i;j;p(a,b){while(b--)putchar(a);}main(){for(;i++<10;)for(j=i*3-4;++j<i*4;p(32,39-j),p(47,1),p(42,j*2),puts("\\"));for(++i;i--;p(32,35),p(124,1),p(i?45:95,8),puts("|"));}

Ungolfed (and slightly disentangled):

int i;
int j;
void p(a,b) {
  while (b--) putchar(a);
}
void main() {
  for (;i++<10;) {
    for (j=i*3-4;++j<i*4;) {
      p(32,39-j);
      p(47,1);
      p(42,j*2);
      puts("\\");
    }
  }
  for (++i;i--;) {
    p(32,35);
    p(124,1);
    p(i?45:95,8);
    puts("|");
  }
}

#C, 169

i;j;p(a,b){while(b--)putchar(a);}main(){for(;i++<10;)for(j=i*3-4;++j<i*4;p(32,39-j),p(47,1),p(42,j*2),puts("\\"));for(++i;i--;p(32,35),p(124,1),p(i?45:95,8),puts("|"));}

Ungolfed (and slightly disentangled):

int i;
int j;
void p(a,b) {
  while (b--) putchar(a);
}
void main() {
  for (;i++<10;) {
    for (j=i*3-4;++j<i*4;) {
      p(32,39-j);
      p(47,1);
      p(42,j*2);
      puts("\\");
    }
  }
  for (++i;i--;) {
    p(32,35);
    p(124,1);
    p(i?45:95,8);
    puts("|");
  }
}

C, 169

i;j;p(a,b){while(b--)putchar(a);}main(){for(;i++<10;)for(j=i*3-4;++j<i*4;p(32,39-j),p(47,1),p(42,j*2),puts("\\"));for(++i;i--;p(32,35),p(124,1),p(i?45:95,8),puts("|"));}

Ungolfed (and slightly disentangled):

int i;
int j;
void p(a,b) {
  while (b--) putchar(a);
}
void main() {
  for (;i++<10;) {
    for (j=i*3-4;++j<i*4;) {
      p(32,39-j);
      p(47,1);
      p(42,j*2);
      puts("\\");
    }
  }
  for (++i;i--;) {
    p(32,35);
    p(124,1);
    p(i?45:95,8);
    puts("|");
  }
}
Source Link
r3mainer
  • 19.7k
  • 7
  • 49
  • 83

#C, 169

i;j;p(a,b){while(b--)putchar(a);}main(){for(;i++<10;)for(j=i*3-4;++j<i*4;p(32,39-j),p(47,1),p(42,j*2),puts("\\"));for(++i;i--;p(32,35),p(124,1),p(i?45:95,8),puts("|"));}

Ungolfed (and slightly disentangled):

int i;
int j;
void p(a,b) {
  while (b--) putchar(a);
}
void main() {
  for (;i++<10;) {
    for (j=i*3-4;++j<i*4;) {
      p(32,39-j);
      p(47,1);
      p(42,j*2);
      puts("\\");
    }
  }
  for (++i;i--;) {
    p(32,35);
    p(124,1);
    p(i?45:95,8);
    puts("|");
  }
}