Computer Science, asked by athulkrishna9219, 8 months ago

Write a program in Java to enter the elements of an array with 20 elements from the user

Answers

Answered by Itzabhi001
1

Explanation:

To find the sum of elements of an array.

  1. create an empty variable. ( sum)
  2. Initialize it with 0 in a loop.
  3. Traverse through each element (or get each element from the user) add each element to sum.
  4. Print sum.
Similar questions