fork(2) download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int i, j, k, n;
  6.  
  7. k = n = 0;
  8. for (i = 1; i <= 12; ++i) {
  9. for (j = 12; j > 0 - n; --j) {
  10. if (j > i) {
  11. putchar(' ');
  12. } else {
  13. putchar('*');
  14. }
  15. }
  16. ++n;
  17. putchar('\n');
  18. }
  19. while (k < 3) {
  20. printf(" ####\n");
  21. ++k;
  22. }
  23. return 0;
  24. }
Success #stdin #stdout 0.01s 1676KB
stdin
Standard input is empty
stdout
           *
          ***
         *****
        *******
       *********
      ***********
     *************
    ***************
   *****************
  *******************
 *********************
***********************
         ####
         ####
         ####