Problem discussion
To solve A Very Big Sum you just need a long long integer Array. Here you have to sum all the Array elements and display the sum.
Now try to solve the problem. If you still get failed to solve the problem, just look at the below code and try again but please don’t copy the code, it is dangerous for your progress.
Source code
Before seeing the source code ensure that you have tried hard most!!!
#include<cstdio>
int main()
{
long long int data[100];
int n;
scanf("%d",&n);
long long int sum = 0;
for(int index = 0; index < n; index++)
{
scanf("%lld",&data[index]);
sum += data[index];
}
printf("%lld\n",sum);
return 0;
}
Be with us, stay happy. Please do your precious comment and give an opportunity to improve us.
Happy coding.
Leave a comment