Array, Recursive Addition
Write a computer program that sums the first N elements of the following array using a recursive function. Your program must first prompt the user to enter a value between 1 and 10. Then your program must use this integer as a parameter to a recursive function that computes the sum of the N integers in the array. Finally, your program must display the results. int myarray[10] = {23, 45, 12, 67, 34, 90, 1, 75, 3, 6};
This program sums up the first N elements of an array (N<=10).
Array = [23, 45, 12, 67, 34, 90, 1, 75, 3, 6]
Enter an integer between 1 and 10: 25
Error. Integer is out of range.
Enter an integer between 1 and 10: -1
Error. Integer is out of range.
Enter an integer between 1 and 10: 5
Total of first 5 elements: 181
() Code by Tacuma Solomon
() Not for Redistribution or Reuse.
Press any key to continue . . . .