subject

An e-commerce company is currently celebrating ten years in business. They are having a sale to honor their privileged members, those who have been using their services for the past five years. They receive the best discounts indicated by any discount tags attached to the product. Determine the minimum cost to purchase all products listed. As each potential price is calculated, round it to the nearest integer before adding it to the total. Return the cost to purchase all items as an integer. There are three types of discount tags: • Type O: discounted price, the item is sold for a given price. • Type 1: percentage discount, the customer is given a fixed percentage discount from the retail price. • Type 2: fixed discount, the customer is given a fixed amount off from the retail price. Example products = [['10', 'do', 'd1'], ['15', 'EMPTY', 'EMPTY'], ['20', 'd1', 'EMPTY"]] discounts = [['d0','1','27'], ['d1', '2', '5']] The products array elements are in the form ['price', 'tag 1', 'tag 2', ..., 'tag m-1'). There may be zero or more discount codes associated with a product. Discount tags in the products array may be 'EMPTY' which is the same as a null value. The discounts array elements are in the form ['tag, 'type', 'amount'). 1. If a privileged member buys product 1 listed at a price of 10 with two discounts available: o Under discount do of type 1, the discounted price is 10 - 10 * 0.27 = 7.30, round to 7. • Under discount d1 of type 2, the discounted price is 10-5 = 5. o The price to purchase the product 1 is the lowest of the two, or 5 in this case 2. The second product is priced at 15 because there are no discounts available 3. The third product is priced at 20. Using discount tag d1 of type 2, the discounted price is 20-5= 15 The total price to purchase the three items is 5+ 15 +15 = 35. int find LowestPrice(int products_rows, int products_columns, char*** products, int discounts_rows, int discounts_columns, char*** discounts) { }

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 08:00
Michael has written an e-mail to his employees that describes a new product special that will be introduced to the customers next week. by taking time to make sure the e-mail is well written, logical, and organized, michael has made sure his message has the characteristics of a) effective communicationb) ineffective communicationc) barriers to communicationd) workplace communication
Answers: 2
question
Computers and Technology, 24.06.2019 02:10
Which sentences describe the things you need to ensure while creating a sketch and a drawing? while an artistic or creative drawing is a creative expression, a technical drawing is an informative expression. you need to create accurate and neat drawings to convey accurate information. a technical drawing clearly conveys its meaning or information, and does not leave room for interpretation maintain a good speed while creating drawings
Answers: 1
question
Computers and Technology, 24.06.2019 17:30
Match the following. 1. formatting that is applied when cell data meets certain criteria 2. borders with formats not found on the border tool 3. a shortcut bar that contains tools for commonly used formats 4. formats that can be applied to numbers conditional formatting custom borders format bar number formats
Answers: 3
question
Computers and Technology, 24.06.2019 17:40
Pseudocode pld #6, pg. 117 start// declarations// number numbertoguess// number myguess; numbertoguess = 92// while myguess ! = numbertoguess// output " guess an integer number between 1 and 100"// input myguess// if (myguess == numbertoguess)// output "you guessed the correct number"// else// output "the number you guessed was incorrect. try again! "// end if// end while// output " for playing the guessing game. have a great day! "// stop
Answers: 3
You know the right answer?
An e-commerce company is currently celebrating ten years in business. They are having a sale to hono...
Questions
question
English, 04.06.2021 23:10
question
Mathematics, 04.06.2021 23:10
question
Social Studies, 04.06.2021 23:10
question
Mathematics, 04.06.2021 23:10
question
Mathematics, 04.06.2021 23:10
question
History, 04.06.2021 23:10
Questions on the website: 13722359