Write a program that computes the total, i.e. sum, of a given list of numbers.
Input begins with a line containing an integer n indicating the number of lines that follow. The number n should not be included in the sum. Each of the n following lines contain an integer xₘ to be accounted for the sum.
Your program should work for n and xₘ in the following ranges:
1 ≤ n ≤ 1000
0 ≤ xₘ ≤ 100 000
Output should contain a single line with an integer t = x₁ + x₂ + x₃ + … + xₙ.
3 1 2 3
5 10 20 30 40 50
try first: hello2
try next: countdown1
Copyright © 2020-2021 Rudy Matela
All rights reserved