Q:

It is possible to initialize a variable to the value of one defined earlier in the same definition

0

It is possible to initialize a variable to the value of one defined earlier in the same definition.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

// ok: price is defined and initialized before it is used to initialize discount
double price = 109.99, discount = price * 0.16;
// ok: call applyDiscount and use the return value to initialize salePrice
double salePrice = applyDiscount(price, discount);

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now