Changed int to unsigned int, and problem 6 has been reduced with two new functions:
input_home_games_into_table;
input_away_games_into_table;