1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Airida [17]
3 years ago
6

The following code does not work as intended. It is meant to input two test grades and return the average in decimal format: int

test1 = scan.nextInt(); int test2 = scan.nextInt(); double average = (test1 + test2 )/2; System.out.println("Answer: " + average);
Computers and Technology
1 answer:
yuradex [85]3 years ago
6 0

Answer:

To return average in Decimal we will use float datatype instead of double.

Explanation:

int test1 = scan.nextInt();

int test2 = scan.nextInt();

float average = (test1 + test2 )/2;

System.out.println("Answer: " + average);

You might be interested in
The last 64 bits of an ipv6 address are the interface identifier. what is frequently used to specify the interface identifier?
Sliva [168]
Answer: the MAC (Media Access Control) address
6 0
3 years ago
Connected contacts require___ to open.
wariber [46]
Manual power





hope it helps you
6 0
3 years ago
What is the interface of an app?
Darina [25.2K]

Explanation:

An application interface or user interface ,is the set of features an application provides so that user may supply input to and recieve output from,the program.

3 0
2 years ago
You wish to lift a 12,000 lb stone by a vertical
Shkiper50 [21]
Ndnsnskiaqosikejwnw sorry
3 0
3 years ago
HELP PLEASE!!!! Which type of prototyping is most often associated with the rapid prototyping development method?
Georgia [21]

Answer:

That will be Throwaway

6 0
3 years ago
Other questions:
  • Assign to avg_owls the average owls per zoo. Print avg_owls as an integer. Sample output for inputs: 1 2 4 3
    7·1 answer
  • Assume that the variables gpa, deansList and studentName, have been declared and initialized . Write a statement that both adds
    6·1 answer
  • Write a shell script called SpellOutDate that prints the detail of the current date in separate lines. For example if the curren
    13·1 answer
  • Jeremy wishes to create a site map for his website. What tag will surround the URL of his home page?
    9·1 answer
  • Write a function called printBackwards() that will work with a C string. The function will print any C string backwards. You don
    13·1 answer
  • Decimal numbers is equivalent to binary 110
    5·1 answer
  • Who is the prince of math?
    5·2 answers
  • You are considering using Wi-Fi triangulation to track the location of wireless devices within your organization. However, you h
    9·1 answer
  • How to execute python code in command prompt *window*?
    5·1 answer
  • Software is in -----language​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!