Sonny gave 12 + 9 + 7 = <<12+9+7=28>>28 boxes of cookies.

Therefore, he was left with 45 - 28 = <<45-28=17>>17 boxes of cookies.

# Answer

17
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Sonny received 45 boxes of cookies from his friend yesterday. He gave 12 to his brother, 9 to his sister, and he gave 7 to his cousin. How many boxes of cookies were left for him?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
17
Sonny received 45 boxes of cookies from his friend yesterday. He gave 12 to his brother, 9 to his sister, and he gave 7 to his cousin. How many boxes of cookies were left for him?
train