|
Re: Scoring function in C
Your algorithm gives the same results as mine (and I think yours is faster, although I haven't really tested it).
The single cout seems to be unnecessary, and removing it saves someone from having to include iostream (if they aren't already using it).
Also, declaring your variables inside the for construct is only legal in c++ not c.
|