fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. for(int row = 0; row < 9; ++row)
  6. {
  7. int y = 4 - abs(row-4);
  8. for(int x = 0; x < 7; ++x)
  9. putchar(x+y <= 4 || x == y+2 ? '*' : ' ');
  10. puts("");
  11. }
  12. }
  13.  
Success #stdin #stdout 0s 5464KB
stdin
Standard input is empty
stdout
*****  
****   
*** *  
**   * 
*     *
**   * 
*** *  
****   
*****