Page 1 of 1

Pease write in C++. Write a function that calculates a discount applicable on the price of an item. ● Your function sho

Posted: Sat May 14, 2022 7:52 pm
by answerhappygod
Pease write in C++.
Write a function that calculates a discount applicable on the
price of an item.
● Your function should have three arguments: the price as
a reference to a double, the discount as a double value, and a bool
to indicate if the discount is calculated as a percentage or a
fixed amount.
● You should calculate the discount and modify the price
of the item accordingly. Do not return the value!
● Use this with a main function that asks for the above
values, passes them to the function, and prints out the result.