Question: Write code in JAVA that would find the sum of 10 real numbers that are entered by the user. You should use a for loop

Write code in JAVA that would find the sum of 10 real numbers that are entered by the user. You should use a for loop and just two variables (three if you include the for loops iterator.) Format your sum so that it is displayed with to digits after the decimal.

Your output should look like the following. User input is in italics.

Please enter the ten numbers:

4 5 -3 2.6 15 23 -3 12 45 -10.4

these ten numbers have a sum of 90.20

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!