Chapter 4: Problem 17
Rewrite the following statements using augmented assignment operators: a. quantity = quantity + 1 b. days_left = days_left ? 5 c. price = price * 10 d. price = price / 2
Short Answer
Expert verified
Question: Rewrite the following statements using augmented assignment operators:
a. quantity = quantity + 1
b. days_left = days_left - 5
c. price = price * 10
d. price = price / 2
Answer:
a. quantity += 1
b. days_left -= 5
c. price *= 10
d. price /= 2