1#include<stdio.h>
2
3int main()
4{
5 int arr[5], i, s = 0;
6
7 for(i = 0; i < 5; i++)
8 {
9 printf("Enter a[%d]: ", i);
10 scanf("%d", &arr[i]);
11 }
12
13 for(i = 0; i < 5; i++)
14 {
15 s += arr[i];
16 }
17
18 printf("\nSum of elements = %d ", s);
19
20 // signal to operating system program ran fine
21 return 0;
22}
23