Add print_sum function and call from main.