Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5 2 8 0 4 0 3 4 8 9 5 2 8 . q 3 z q y 7 Jump to level 1 First,

5280403489528.q3zqy7
Jump to level 1
First, read the first floating-point number from input. Then, read the remaining floating-point numbers while the floating-point numbers are in the range -30.0 to 15.0, both exclusive. Next, find the sum of the floating-point numbers that are in the given range. Lastly, output the sum, ending with a newline.
Ex: If the input is -29.5-23.0-49.5-27.5-27.0-29.0, then the output is:
-52.5
Note: -30.0 and 15.0 are not in the given range.
import java.util.Scanner;
public class SumInRange {
public static void main(String[] args){
Scanner scnr = new Scanner(
System.in);
double dataValue;
double sumInRange;
sumInRange =0.0;
Y* Your code goes here*/
}
}
1
2
Feedback?
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions