! /bin/bash I omitted here though I have used it. I used bash shell only. first integer is the no of variables in the array. yes I did get syntax error. I want to know the problem with my code.need help with reading the array and sum of the array elements.given an array of integers of size N . You need to print the sum of the elements in the array, keeping in mind that some of those integers may be quite large.Input Format:The first line of the input consists of an integer N . The next line contains space-separated integers contained in the array (1<=N<=10, 0<=A[i]<=10000000000).51000000001 1000000002 1000000003 1000000004 1000000005Output Format:Print a single value equal to the sum of the elements in the array.5000000015what I have done so far:code:#input array sizeread Nwhile [ $N -ge 1 -a $N -le 10 ]doecho $Nbreakdonefor i in `seq 0 N-1`;do read -a array[i]if[ ${array[i]} -ge 0 -a ${array[i]} -le 10000000000 ]; thenecho ${array[i]}fidone#sum=expr `sum + ${ array[i] }`Syntax error:operator expectedCould you please let me know where I went wrong?
reading array and summation of elements
shell script;array