➽ Problem:-
https://www.hackerrank.com/challenges/simple-array-sum/problem
#include<stdio.h>
int main()
{
int Num,sum=0;
scanf("%d",&Num);
int arr[Num];
for(int i=0;i<Num;i++)
{
scanf("%d",&arr[i]);
sum = sum + arr[i];
}
printf("%d",sum);
return 0;
}
0 Comments
Please do not enter any spam link in the comment section.