Special Sum of array
Level EASY
Given an array of length N, which contains single digit elements at every index. You need to find and return the sum of all elements of the array. But the final sum should also be single digit.
Level EASY
Given an array of length N, which contains single digit elements at every index. You need to find and return the sum of all elements of the array. But the final sum should also be single digit.
Line 1 : An Integer N i.e. size of array
Line 2 : N integers which are elements of the array, separated by spaces
Single digit sum
3
9 9 9
9
5
1 7 8 5 9
3
Comments
Post a Comment
Please give us your valuable feedback