in reply to Re: Re: Ranking/Score keeping
in thread Ranking/Score keeping
Once I've entered the required input the program ends and does not print any output to the screen. It writes to the rank.txt file:
I'm not sure where you came up with 732, it is not displayed anywhere that I can see. Just because something was coded in C++ doesn't mean that it will work correctly after you convert it to Perl. If your plan is to read in each team's data and then do calculations and write the info back out to the file, you should use logic along these lines:--------------------------------------- 1:244:244:andy ben:1 <> 2:244:244:cathy doug:1 <> 3:244:244:elaine fred:1 <> 4:244:244:gail harry:1 ---------------------------------------
More observations:if rank.txt exists { if rank.txt is not empty { read each team's info and store in an array/hash } } if user wants to add new team data { loop # once through loop gets only data for one team get* team number get* member names get* team scores/whatever append record to rank.txt endloop # * input/store to array/hash } perform calculations for array/hash print results
|
|---|