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*

3
  • 4
    \$\begingroup\$ I don't think the namespace is required. All names should be a single character, including Program and cBase. And yes, you should inline cBase. Also, combine declaration and initialization, i.e., int c=0,m=0. \$\endgroup\$ Commented Feb 1, 2013 at 18:22
  • 2
    \$\begingroup\$ Also, it looks like you've combined your test code with the function code that performs the logic. The spec requires an input of a number/string of digits, and the output of an integer. It would be fair to simply create a function that takes int parameter, and returns int parameter, without even a Main method, and call the character count your score. \$\endgroup\$ Commented Feb 1, 2013 at 18:29
  • \$\begingroup\$ @mellamokbtheWise - I learned something new. I always assumed the namespace was required. Also, good catch on the test array, that saves me some chars, and I am now actually answering the challenge. \$\endgroup\$ Commented Feb 7, 2013 at 1:34