3066: 递归求数组元素和
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:13
Solved:5
Description
定义递归函数int sumArray(int arr[], int len),计算数组所有元素的和。主函数输入数组长度和元素,调用函数输出和。
Input
第一行输入数组长度 n,第二行输入 n 个整数
Output
数组元素和
Sample Input Copy
4 1 2 3 4
Sample Output Copy
10