fork download
  1. #include <stdio.h>
  2.  
  3. #define HEIGHT 6
  4.  
  5. int main(void) {
  6. char* f = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  7. char* b = "ZYXWVUTSRQPONMLKJIHGFEDCBA";
  8. int c = 0;
  9.  
  10. for(int i=0; i<HEIGHT; ++i)
  11. {
  12. printf("%*.*s%.*s\n", 10, i+1, f+i+c, i, b+strlen(b)-(c+2*i));
  13. c+=i;
  14. }
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
         A
        BCB
       DEFED
      GHIJIHG
     KLMNONMLK
    PQRSTUTSRQP