fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int i, column = 6,width=5;
  5. for(i=1;i<=2*column+(width-2);i++)
  6. {
  7. if(i <= column || i-column>=width-1)
  8. printf("*");
  9. else
  10. {
  11. printf("\n*%*s",(column-1),"*");
  12. if (i-column==width-2)
  13. printf("\n");
  14. }
  15. };
  16. return 0;
  17. }
Success #stdin #stdout 0s 2292KB
stdin
Standard input is empty
stdout
******
*    *
*    *
*    *
******