Here is another INPUT information output program. The first 3 select cases work correctly. I attempted the 4th and 7th select cases but they are not working correctly, i would appreciate any feedback i get, even if it's "I don't have a freaking clue." Could you guys help a girl out?
Thanks,
Ananda
Here is the code so far: (The NCAAdata.txt file and a more thurogh description of the program and it's perametors are attached)
'Ananda Bennett
'11/29/06
'NCAA
OPEN "c:\ncaadata.txt" FOR INPUT AS #1
'VARIABLE DESCRIPTIONS:
'Year Columns 1-4
'Winning School Columns 6-24
'Winning Score Columns 25-27
'Losing School Columns 29-47
'Losing Score Columns 48-50
'Numeric Variables: Year, Winning Score, Losing Score
'String Variables: Winning School, Losing School
'SPECIAL NOTES:
'The last game listed for each year is the championship game.
LET lowscore = 1000
PRINT"**********************************************************************************************************************************************************************************************"
PRINT"***** 1 - Total number of games where losing team scored more than 100 pts *****"
PRINT"***** 2 - Total number of games where a team scored more than 100 pts ***** *****"
PRINT"***** 3 - Total number of games won and lost by Kentucky (games won - games lost)*****"
PRINT"***** 4 - Lowest total points scored by both teams in a single NCAA Tournament game*****" '(include game information)
PRINT"***** 5 - Highest number of points scored by a single team in a game*****" '(include game information).
PRINT"***** 6 - Largest margin of victory*****" '(include game information)
PRINT"***** 7 - Average score of winning team and average score of losing team*****" '(avg winner - avg loser)
PRINT"***** 8 - Average points scored per game from 1975-85 versus 1985-95*****"
PRINT"***** 10 - What decade had the most total NCAA Tournament games*****" '(give all decades and the number of games played in each)
PRINT"***** 11 - List these teams: UCLA, North Carolina, Kentucky, and Kansas - With each team give the total number of appearances in NCAA Tournaments (wins and losses) and championships won*****"
PRINT"***************************************************************************"
INPUT "What information would you like search for? "; schoice
DO WHILE EOF(#1) <> -1
INPUT #1, year, winningschool$, winningscore, loosingschool$, loosingscore
SELECT CASE schoice
CASE 1
IF loosingscore > 100 THEN
LET count = count + 1
END IF
CASE 2
IF loosingscore > 100 THEN
LET count = count + 2
END IF
'IF winningscore > 100 THEN
'LET count = count + 1
'END IF
CASE 3
IF winningschool$ = "KENTUCKY" THEN
LET kwincount = kwincount + 1
END IF
IF loosingschool$ = "KENTUCKY" THEN
LET kloosecount = kloosecount + 1
END IF
IF EOF(#1) = -1 THEN
PRINT kwincount; " - " ;kloosecount
ELSE
END IF
CASE 4
LET totalscore = loosingscore + winningscore
IF totalscore < lowscore THEN
LET winner$ = winningschool$
LET looser$ = loosingschool$
LET lowestscore = lowscore
LET lowscore = lowestscore
PRINT "Winning school: " ;winningschool$; " Loosing school: " ;loosingschool$
ELSE
END IF
CASE 7
LET count = count + 1
LET wscoreaverage = (winningscore + winningscore)/ count
wscoreaverage
PRINT wscoreaverage; " " ;winningscore; " + " ;winningscore; "/ " ;count
END SELECT
LOOP
CLOSE #1