Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • \$\begingroup\$ Awesome thanks I just got start golfing, thanks for the help! \$\endgroup\$ Commented Aug 1, 2017 at 6:11
  • 1
    \$\begingroup\$ If you change your IO method to accepting a parameter as input, then outputting to STDOUT, then I think f(i){int a,b;for(a=0;a<i;a++){for(b=0;b<i;b++)printf("%d ",a+b+1==i||!a&&!b||a==i-1&&b==i-1);printf("\n");}} works. \$\endgroup\$ Commented Aug 1, 2017 at 14:33
  • \$\begingroup\$ Instead of printf("\n") you can do puts("") \$\endgroup\$ Commented Aug 1, 2017 at 16:51
  • \$\begingroup\$ Okay, is it okay if I post my solution separately due to the differing IO method? \$\endgroup\$ Commented Aug 1, 2017 at 18:27
  • \$\begingroup\$ Ya sure it's all casual for me \$\endgroup\$ Commented Aug 1, 2017 at 18:29