题解 | #N个数之和#
N个数之和
https://www.nowcoder.com/practice/b007744eb43b4f7b95d9e87de01528db
#include <stdio.h> int main() { int n = 0; scanf("%d",&n); int arr[100]; int i,sum = 0; for(i=0;i<n;i++) { scanf("%d",&arr[i]); sum += arr[i]; } printf("%d\n",sum); return 0; }