Author Question: What is the value of average after the following code executes? double average;average = 1.0 + 2.0 + ... (Read 109 times)

AEWBW

  • Hero Member
  • *****
  • Posts: 579
What is the value of average after the following code executes?
double average;
average = 1.0 + 2.0 + 3.0 / 3.0;

3.0
4.0
2
2.0
◦ unknown



Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question


 

Did you know?

The ratio of hydrogen atoms to oxygen in water (H2O) is 2:1.

Did you know?

The types of cancer that alpha interferons are used to treat include hairy cell leukemia, melanoma, follicular non-Hodgkin's lymphoma, and AIDS-related Kaposi's sarcoma.

Did you know?

In the United States, an estimated 50 million unnecessary antibiotics are prescribed for viral respiratory infections.

Did you know?

Alcohol acts as a diuretic. Eight ounces of water is needed to metabolize just 1 ounce of alcohol.

Did you know?

Though newer “smart” infusion pumps are increasingly becoming more sophisticated, they cannot prevent all programming and administration errors. Health care professionals that use smart infusion pumps must still practice the rights of medication administration and have other professionals double-check all high-risk infusions.

For a complete list of videos, visit our video library