تمرین برنامه نویسی ١٥
Write a program including a function named 'sumlist' which calculates the sum of all numbers in the given list.
First line of input is n
then n
lines of numbers follows.
توضیحات
برنامه ای بنویسید شامل یک تابع به نام sumlist که مجموع اعداد لیست را محاسبه کند ورودی شامل یک عدد n و سپس n عدد برای اعضای لیست.
نمونه ورودی و خروجی
Input:
4
8
6
2
10
Output:
30