Answered

Given a double variable named total with a value of 62.5 and an integer variable named quantity with a value of 4, what will the value of price be after you execute this statement? double price = total / quantity;

Answer :

Answer:

The value of price is $15.625

Explanation:

In the question, the formula is given for computing the value of the price.

The calculation is shown below:

Here, the total value would be 62.5 and the integer variable quantity is 4, so we easily compute the value of price

Price = Total ÷ Quantity

        = 62.5 ÷ 4

        = $15.625

The quantity should be expressed in units or some other measurement value, the price should be a dollar or any other monetary units.

Other Questions