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\$ You can save a few bytes by using scanf instead of command line arguments. Also, o=0 is unnecessary, since o is global. \$\endgroup\$ Commented Jun 16, 2014 at 6:47
  • \$\begingroup\$ main could hold a default int variable, incrementing c and i in between assignments and statements could shorten the code, the assignment of l could be taken back to the first for loop's third block so you would not need braces and using only one character of separator in printf could definitely make it more compact. \$\endgroup\$ Commented Jun 16, 2014 at 9:51
  • \$\begingroup\$ Thanks, bebe! I noticed that I also had c<=i-1, which is just silly. \$\endgroup\$ Commented Jun 16, 2014 at 17:47
  • \$\begingroup\$ I don't see a way to shave a byte by incrementing i in the l assignment expression, since the (new) value of i is used to decrement n. Any tips? \$\endgroup\$ Commented Jun 16, 2014 at 22:45
  • \$\begingroup\$ if i remember correctly there is one place where you can increment i, but i belive its compiler dependent :( \$\endgroup\$ Commented Jun 17, 2014 at 6:42