Post History
C (clang), 210 198 183 bytes i,j,k,l;s(v,w,x,y,z){printf("%s",v);for(;w<x;w++){printf("%s",y);}puts(z);}main(){scanf("%i",&i);l=i-3;s("╔",j,l,"╦","╗");for(j=0;j<i-2;j++){s("╠",k,l,"╬",...
Answer
#3: Post edited
# [C (clang)], <s>210</s> 198 bytes- <!-- language-all: lang-c -->
i,j,k,l;s(x,y,z){for(;x<y;x++){printf("%s",z);}}main(){scanf("%i",&i);printf("╔");l=i-3;s(j,l,"╦");puts("╗");for(j=0;j<i-2;j++){printf("╠");s(k,l,"╬");puts("╣");}printf("╚");s(j=0,l,"╩");puts("╝");}[Try it online!][TIO-kss5rvrr]- Still wondering if these characters could even count as a byte, probably two. ¯\\\_(ツ)_/¯
- A special golfing trick I learned. If you don't want to repeat the loops, then make a function. For some reason, [C (clang)] is okay with such non-returning function that's not `main()`. Enough abuse for this.
- [C (clang)]: http://clang.llvm.org/
[TIO-kss5rvrr]: https://tio.run/##TY3hCoIwHMRfJRbFhjOi6NO0dxHN@s81xSlo4lskQRAEQRD0VL7I2pLIb8fd7@5CNxSB3OspyFCU0W7iqSKCdHHYaqCcJlQwhSta0xNp4jTHrPJqVjkOabIcZBFjNFPIhKxtjwFITBoVBtLagOgcCPthfXdGhAkf3LVZ5FRQYz2NlZWFsvHFaPvA/SXjHrgrxsc3fXc3gMLJ0HyPmg@j2z93/XJmZiBfI/JmSa03Hw "C (clang) – Try It Online"
- # [C (clang)], <s>210</s> <s>198</s> 183 bytes
- <!-- language-all: lang-c -->
- i,j,k,l;s(v,w,x,y,z){printf("%s",v);for(;w<x;w++){printf("%s",y);}puts(z);}main(){scanf("%i",&i);l=i-3;s("╔",j,l,"╦","╗");for(j=0;j<i-2;j++){s("╠",k,l,"╬","╣");}s("╚",j=0,l,"╩","╝");}
- [Try it online!][TIO-kssvwcx4]
- Still wondering if these characters could even count as a byte, probably two. ¯\\\_(ツ)_/¯
- A special golfing trick I learned. If you don't want to repeat the loops, then make a function. For some reason, [C (clang)] is okay with such non-returning function that's not `main()`. Enough abuse for this.
- [C (clang)]: http://clang.llvm.org/
- [TIO-kssvwcx4]: https://tio.run/##VY5dCoJAFIW3EhPFDF5Dip5G24to1rVpFMd/cRdFEARBEAStqo3YjD31cjnwfZxzAzsQvtwNU5SBKMLtxFV5iMlivxkQYjiA4IqWUEENDbSsSzOUeUTJTBEoGY@SjPLKrXllWf@wYbxPi1zRVoejj5KyTgW@NBgJzJFx4aG90vXkcz4RPSZApycx90J@3bHn8NhFe8ljMzC6d2LeMtZ7dB/a7Udy1S2e82Ovkd0MG4b1Fw "C (clang) – Try It Online"
#2: Post edited
# [C (clang)], 210 bytes- <!-- language-all: lang-c -->
i,j,k,l;main(){scanf("%i",&i);printf("╔");l=i-3;for(;j<l;j++){printf("╦");}puts("╗");for(j=0;j<i-2;j++){printf("╠");for(k=0;k<l;k++){printf("╬");}puts("╣");}printf("╚");for(j=0;j<l;j++){printf("╩");}puts("╝");}[Try it online!][TIO-ksrcgdyq]- Still wondering if these characters could even count as a byte, probably two. ¯\\\_(ツ)_/¯
- [C (clang)]: http://clang.llvm.org/
[TIO-ksrcgdyq]: https://tio.run/##S9ZNzknMS/@vnJmXnFOakqpgU1ySkpmvl2H3P1MnSydbJ8c6NzEzT0Ozujg5MS9NQ0k1U0lHLVPTuqAoM68EyH80dYqSpnWObaausXVafpGGdZZNjnWWtrZmNULFMqCK2oLSkmIQZzqQA1KYZWsAVJupa4SuegFUQTZQQTbQsGxU6TXIhi0Gc@Bys1DMxnDHSmStc0Gc//9NAA "C (clang) – Try It Online"
- # [C (clang)], <s>210</s> 198 bytes
- <!-- language-all: lang-c -->
- i,j,k,l;s(x,y,z){for(;x<y;x++){printf("%s",z);}}main(){scanf("%i",&i);printf("╔");l=i-3;s(j,l,"╦");puts("╗");for(j=0;j<i-2;j++){printf("╠");s(k,l,"╬");puts("╣");}printf("╚");s(j=0,l,"╩");puts("╝");}
- [Try it online!][TIO-kss5rvrr]
- Still wondering if these characters could even count as a byte, probably two. ¯\\\_(ツ)_/¯
- A special golfing trick I learned. If you don't want to repeat the loops, then make a function. For some reason, [C (clang)] is okay with such non-returning function that's not `main()`. Enough abuse for this.
- [C (clang)]: http://clang.llvm.org/
- [TIO-kss5rvrr]: https://tio.run/##TY3hCoIwHMRfJRbFhjOi6NO0dxHN@s81xSlo4lskQRAEQRD0VL7I2pLIb8fd7@5CNxSB3OspyFCU0W7iqSKCdHHYaqCcJlQwhSta0xNp4jTHrPJqVjkOabIcZBFjNFPIhKxtjwFITBoVBtLagOgcCPthfXdGhAkf3LVZ5FRQYz2NlZWFsvHFaPvA/SXjHrgrxsc3fXc3gMLJ0HyPmg@j2z93/XJmZiBfI/JmSa03Hw "C (clang) – Try It Online"
#1: Initial revision
# [C (clang)], 210 bytes <!-- language-all: lang-c --> i,j,k,l;main(){scanf("%i",&i);printf("╔");l=i-3;for(;j<l;j++){printf("╦");}puts("╗");for(j=0;j<i-2;j++){printf("╠");for(k=0;k<l;k++){printf("╬");}puts("╣");}printf("╚");for(j=0;j<l;j++){printf("╩");}puts("╝");} [Try it online!][TIO-ksrcgdyq] Still wondering if these characters could even count as a byte, probably two. ¯\\\_(ツ)_/¯ [C (clang)]: http://clang.llvm.org/ [TIO-ksrcgdyq]: https://tio.run/##S9ZNzknMS/@vnJmXnFOakqpgU1ySkpmvl2H3P1MnSydbJ8c6NzEzT0Ozujg5MS9NQ0k1U0lHLVPTuqAoM68EyH80dYqSpnWObaausXVafpGGdZZNjnWWtrZmNULFMqCK2oLSkmIQZzqQA1KYZWsAVJupa4SuegFUQTZQQTbQsGxU6TXIhi0Gc@Bys1DMxnDHSmStc0Gc//9NAA "C (clang) – Try It Online"