Question: Create a program in Java that will read in values from the user into an array. The user should enter the number of values that

Create a program in Java that will read in values from the user into an array. The user should enter the number of values that they array will hold. Theses values can be any type of number. Read all the values into the array. After all the values are read into the array, multiply the values in the array, then print out all the numbers held in the array on one line, with a tab between them. On the next line, print out the product of the array numbers. After you print out the product; multiply the answer by the constant value of 2.71828 and print out this result as well.

Make sure you use all variables to stand for the nubmers in the program. Also, make sure that the array cannot by out of bounds during the loops.

You can check with this user input:

2,3,4,5,8

The product is 960.

The product with the constant value of 2.71828 is 2609.5488

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!