Thank you for your comment. I ran the code with 'use strict' and '-w' (including a 'use vars' statement at the top) and it ran and compiled and whatnot successfully. I probably should have clarified, but some problems that I noticed witht the output was this:

(1)The first output works correctly, except a blank line is added at the top (could it make an error in my logic?)
(2)THe second(and third and etc.) time it is not correct. Namely, when I enter the data and give the team number, if I have given the team numbers as 1 2 3 and 4, and I enter 1, it does not prompt me for the names(this is correct, because I would already have them) BUT for 2 3 and 4 it incorrectly prompts me for their names; also, the output is erroneous. Namely the last part of it (the number of matches) stays at 1, i.e., does not increase to 2 (3, 4, etc.) as it should. Also it doesn't average the score, or remember the names.

Sample input for the program would be this, if it helps: 11 . 2 . 3 . 2 . 92 . 0 . 0 . 0 . 0 . 0 . 1 . name1 name2 . 2 . name3 name4 . 3 . name5 name6 . 4 . name7 name8 . <END OF INPUT>

The score would be 732 (as it correctly displays); but if you enter the SAME data again, it works incorrectly (and if you change the 11, let us say, to a 10, you can see that the scores don't average either).

As for the "calculations" I don't think you need to know them, becuase (I may not have made it clear) but they DO work. . . it is the actual ranking that does not. I have tested them (in the original C++ they were written in, albeit) and they work fine.

If any more info is needed, just ask.


In reply to Re: Re: Ranking/Score keeping by Anonymous Monk
in thread Ranking/Score keeping by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.