Author Question: What is the value of average after the following code executes? double average;average = 1.0 + 2.0 + ... (Read 78 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?

For about 100 years, scientists thought that peptic ulcers were caused by stress, spicy food, and alcohol. Later, researchers added stomach acid to the list of causes and began treating ulcers with antacids. Now it is known that peptic ulcers are predominantly caused by Helicobacter pylori, a spiral-shaped bacterium that normally exist in the stomach.

Did you know?

Looking at the sun may not only cause headache and distort your vision temporarily, but it can also cause permanent eye damage. Any exposure to sunlight adds to the cumulative effects of ultraviolet (UV) radiation on your eyes. UV exposure has been linked to eye disorders such as macular degeneration, solar retinitis, and corneal dystrophies.

Did you know?

When blood is deoxygenated and flowing back to the heart through the veins, it is dark reddish-blue in color. Blood in the arteries that is oxygenated and flowing out to the body is bright red. Whereas arterial blood comes out in spurts, venous blood flows.

Did you know?

Blood in the urine can be a sign of a kidney stone, glomerulonephritis, or other kidney problems.

Did you know?

ACTH levels are normally highest in the early morning (between 6 and 8 A.M.) and lowest in the evening (between 6 and 11 P.M.). Therefore, a doctor who suspects abnormal levels looks for low ACTH in the morning and high ACTH in the evening.

For a complete list of videos, visit our video library