dimanche 31 juillet 2016

finding the sum of the array when size is not given by the user,

Input The i-th line of the input contains an integer ai (0 ≤ a ≤ 1000) — the i-th element of the array. The size of the array is between 1 and 10, inclusive. Note that the size of the array is not given explicitly!

Output Output a single integer — the sum of the elements of the array.

Aucun commentaire:

Enregistrer un commentaire