#include<stdio.h>
int fun(int a[],int n);
int main()
{
int n,x;
printf("enter the number:");
scanf("%d",&n);
int a[n],i;
printf("Enter the array:");
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
int result=fun(a,n);
printf("the answer is :%d",x);
}
int fun(int a[],int n)
{
int x=0;
for(int i=0;i<n;i++)
{
x=x+a[i];
}
return x;
}