โ Back to Arrays
Question 376
Product of All Array Elements
Product of All Array Elements
Multiply all elements of the array{1, 2, 3, 4, 5}together and print the single result withSystem.out.println: 120 Start yourproductaccumulator at1(not0), or every product becomes zero. Do not hardcode120.
Expected Output:
120
Topics:
Arrays
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (sysout, psvm, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.