➽ Problem:-
https://www.hackerrank.com/challenges/a-very-big-sum/problem
➽ Solution:-
#include
<assert.h>
#include
<limits.h>
#include
<math.h>
#include
<stdbool.h>
#include
<stddef.h>
#include
<stdint.h>
#include
<stdio.h>
#include
<stdlib.h>
#include
<string.h>
int main()
{
int num, arr[100];
long long int sum=0;
scanf("%d", &num);
for(int i=0; i<num; i++)
{
scanf("%d", &arr[i]);
}
for(int i=0; i<num; i++)
{
sum += arr[i];
}
printf("%lld", sum);
return 0;
}
0 Comments
Please do not enter any spam link in the comment section.