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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply