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
Which are factors that go into a project plan?
BaLLatris [955]

Answer:

The four critical factors to planning a successful project

Explanation:

5 0
3 years ago
Computer A has an overall CPI of 1.3 and can be run at a clock rate of 600 MHz. Computer B has a CPI of 2.5 and can be run at a
kirill115 [55]

Answer:

Check the explanation

Explanation:

CPI means Clock cycle per Instruction

given Clock rate 600 MHz then clock time is Cー 1.67nSec clockrate 600M

Execution time is given by following Formula.

Execution Time(CPU time) = CPI*Instruction Count * clock time = \frac{CPI*Instruction Count}{ClockRate}

a)

for system A CPU time is 1.3 * 100, 000 600 106

= 216.67 micro sec.

b)

for system B CPU time is =\frac{2.5*100,000}{750*10^6}

= 333.33 micro sec

c) Since the system B is slower than system A, So the system A executes the given program in less time

Hence take CPU execution time of system B as CPU time of System A.

therefore

216.67 micro = =\frac{2.5*Instruction}{750*10^6}

Instructions = 216.67*750/2.5

= 65001

hence 65001 instruction are needed for executing program By system B. to complete the program as fast as system A

3 0
3 years ago
Is a defense of a political position an argument
shutvik [7]

Answer:

yes

Explanation:

yyyyyyyyyyeeeeeeeeesssssss

8 0
3 years ago
Does anyone know what anotmy means​
deff fn [24]

Answer:

also its spelled anatomy

Explanation:

The branch of science concerned with the bodily structure of humans, animals, and other living organisms, especially as revealed by dissection and the separation of parts.

Hope this helped :3

3 0
3 years ago
Read 2 more answers
PLZ HELP WILL MARK BRANLIEST Jargon is:
77julia77 [94]

Answer:C language that include terms that only a select

Explanation:

It’s the right one

7 0
3 years ago
Other questions:
  • Your boss asks you to work through the weekend to install new software on the applications server that serves up applications to
    15·2 answers
  • The ________ utility automatically creates duplicates of your libraries, desktops, contacts, and favorites to another storage lo
    7·1 answer
  • Help with this robotics hw pls
    5·1 answer
  • Your company runs several databases on a single MySQL instance. They need to take backups of a specific database at regular inte
    12·1 answer
  • In 3 to 5 sentences, describe whether or not files should be deleted from your computer. Explain you answer.
    14·2 answers
  • Although some families have more resources than other families, there is always a limited amount of resources that families have
    15·2 answers
  • Which should be addressed by stakeholders when reviewing the problem statement? Select all that apply. All possible outcomes hav
    12·1 answer
  • What is this?
    15·2 answers
  • During the preventive maintenance phase of a project involving a hydraulic power system, an engineer must change a gasket on a p
    14·1 answer
  • A financially stable person is able to:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!