Read a single line of space-separated integers (any count) and print their sum. Use a rest-parameter style function sum(...nums).
sum(...nums)
Input: one line of integers. Output: the sum.
Your program reads from stdin and prints to stdout.
Example 1
Input: 1 2 3
Output: 6
Hints