title: is there a way to make a festive tree like this in C?
body: <p>i would like to know if you can re-arrange these words into this format on C</p>
  <pre><code>                  Jojo|Jojo
                      is|is
                     the|the
                    Best|Best
              Intheworld|Intheworld
  </code></pre>
  <p>this is the code that I have inputted but it doesn't seem to work:</p>
  <pre><code>char a[50],b[50],c[50],d[50];
  
  gets(a);
  gets(b);
  gets(c);
  gets(d);    
  //tried to putt it into the middle with this string
  a[strcspn(a, &quot;\n&quot;)] = 0;
  b[strcspn(b, &quot;\n&quot;)] = 0;
  c[strcspn(c, &quot;\n&quot;)] = 0;
  d[strcspn(d, &quot;\n&quot;)] = 0;    
  //this is how i print it
  printf(&quot;    %s|%s\n&quot;,a,a);
  printf(&quot;    %s|%s\n&quot;,b,b);
  printf(&quot;    %s|%s\n&quot;,c,c);
  printf(&quot;    %s|%s\n&quot;,d,d);
  </code></pre>