Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Lab 7.1 - Exercises on functions and arrays – Code in C++
Exercise
Write a function subTotal() declaration (prototype) and a function definition for a function that
takes one argument of type int and one argument of type double, and that returns a value of
type double that is the multiplication of the two arguments.
Write a function printTotal() declaration (prototype) and a function definition for a function
that takes one argument of type double, and allow you to print out the value passed as value,
and that returns the void data type.
Write a program in C++ where you have to integrate those 2 functions definitions and called
inside in main() function.
Your application should have also a menu to be presented to the user and allow to simulate
buying up to 5 of some products that have their prices between 10.50$ to 249.90$.
The program should display the sub-total (qty * price), and also the final price of the transaction
with the sales taxes (stotal + stotal * 0.05 + stotal * 0.09975).
Save all the results into an array and then print out the sum of all 5 entries using the for loop.
Identify yourself and send the solution as a compressed file on LEA of Omnivox.
Thank you.