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