$m) ? $saleCost : $m; $s -= $gameCost; if ($s < 0) { return $gamesBought; } $gamesBought++; } // Return the number of games you can buy } fscanf($handle, "%i %i %i %i", $p, $d, $m, $s); $answer = howManyGames($p, $d, $m, $s); echo $answer . "\n"; ?>