Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started