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