Question: Tony Gaddis Chapter 7 Array C++ Please help me to solve this... I have no idea how to do it. thanks... 9. Price Calculation Write
Tony Gaddis Chapter 7 Array C++


Please help me to solve this... I have no idea how to do it. thanks...
9. Price Calculation Write a program that uses the following arrays: plu: an array of price lookup codes (PLU) for products at a grocery store price: an array of gross prices of products vat: an array of the Value Added Tax (VAT) rate for each product 48 Challenges The program should relate the data in each array through the subscripts. The nth element of each array contains, respectively, the PLU, the gross price, and the VAT rate of the same product. For example, element 0 in the price array should contain the gross price of the product whose PLU code is stored in element 0 of the plu array. The same product's VAT rate should be stored in element 0 of the vat array. Write a function that takes three argumentsthe array plu, the length of the array, and the PLU of a specific productand returns the index of the PLU in the array. If the PLU cannot be found, the function must return -1. Write another function that takes six arguments: the three arrays, the length of these arrays (they have the same length), a PLU code, and the number of articles. The func- tion should return the net total for this number of products, and -1 if the PLU code does not exist
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
