Question
Write a Raptor program for the following problem: a) Write a loop to ask the user for the description of a product, quantity sold and
Write a Raptor program for the following problem: a) Write a loop to ask the user for the description of a product, quantity sold and the cost per item and store the data in 3 different arrays. You can use a sentinel value to end the input processing or ask the user up front for the number of items to be entered. DO NOT use yes/no/exit, etc. to end the loop. b) In another loop, create another array that holds the cost of the product by multiplying the quantity sold by the cost per item. c) In another loop, display the content of the 4 arrays, one product at a time. Making sure the output looks and feels OK. d) Ask the user for description of a product and display the corresponding cost. If the product does not exist, issue an error message. e) In another loop, calculate average cost of the products and display the average
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started