fork(1) download
  1. #include <stdio.h>
  2. void line(char s, int w, char b, char e)
  3. {
  4. { putchar(s); }
  5. while(w --> 0) { putchar(b); }
  6. { putchar(e); }
  7. { putchar('\n'); }
  8. }
  9.  
  10. int main(void) {
  11. int width = 10;
  12. int height = 6;
  13. width -= 2;
  14. height-= 2;
  15. { line('+', width, '-', '+'); }
  16. while(height --> 0) { line('|', width, ' ', '|'); }
  17. { line('+', width, '-', '+'); }
  18. return 0;
  19. }
Success #stdin #stdout 0s 2008KB
stdin
Standard input is empty
stdout
+--------+
|        |
|        |
|        |
|        |
+--------+