Reference no: EM132209639
Question :
Write a program that computes the total revenue earned during an entire month at an electronics shop.
The shop sells 10 different items, and we have information regarding the the total number of items sold and the year of manufacture for each type of the item.
Create three parallel arrays. An array named " cost " (type double) will hold the cost of each type of the item, an array named " yearofmanufacture " (type int) will hold the manufacturing year of each type of the item, and lastly an array named " soldcount" (type int) will hold the number of items sold for each type of the item.
Based on the year of manufacture, each type of the item has a discount as per the following table.
Year of Manufacture --------------- Discount
1991 <= year to year <=2000 -> 40% discount
2001 <= year to year <=2010 -> 20% discount
2011 <= year to year <=2017 -> 10% discount
Example Output:
Enter the cost for all the 10 types of items, separated by a space 123 459 452 . . . . . . . .
Enter the year of manufacture for all the 10 types of items, separated by a space 1991 2013 1996 2008 . . .
Enter the number of items sold for all the 10 types of items, separated by a space 1030505804 0...
The total revenue earned is: $789