fork download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int row, c;
  5. for (row = 1; row <= 3; row++)
  6. {
  7. for (c = 1; c <= 3-row; c++)
  8. printf(" ");
  9.  
  10. for (c = 1; c <= 2*row - 1; c++)
  11. printf("*");
  12.  
  13. printf("\n");
  14. }
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5316KB
stdin
3
stdout
  *
 ***
*****