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*

4
  • 1
    \$\begingroup\$ You can save 6 bytes by writing System.Console.ReadLIne directly and drop the using-Statement. \$\endgroup\$ Commented May 4, 2017 at 6:39
  • \$\begingroup\$ A while loop would be the same number of bytes, but methinks a more idiomatic way of writing the code than a for loop. \$\endgroup\$ Commented May 5, 2017 at 13:00
  • \$\begingroup\$ you can save 24 bytes by writing it as a lambda in the form () => {} \$\endgroup\$ Commented May 8, 2017 at 17:08
  • \$\begingroup\$ or alternatively, 7 by making it an instance method \$\endgroup\$ Commented May 8, 2017 at 17:09