Presentation is loading. Please wait.

Presentation is loading. Please wait.

Parallel Arrays Two arrays are said to be parallel if subscripted variables having the same subscript are related.

Similar presentations


Presentation on theme: "Parallel Arrays Two arrays are said to be parallel if subscripted variables having the same subscript are related."— Presentation transcript:

1 Parallel Arrays Two arrays are said to be parallel if subscripted variables having the same subscript are related.

2 A retail store has five bins, numbered 1 to 5, each containing a different commodity. At the beginning of a particular day, each bin contains 45 items. Table 1 shows the cost per item for each of the bins and the quantity sold during that day. Write a program to: Place the cost per item and quantity sold in parallel arrays Display a table giving the inventory at the end of the day and the amount of revenue from each bin Compare the total revenue from each bin List the number of each bin that contains fewer than 20 items at the end of the day Bin Cost Per Item Quantity Sold 1 3 10 2 12.25 30 37.45 9 4 7.49 42 5 24.95 17

3

4

5


Download ppt "Parallel Arrays Two arrays are said to be parallel if subscripted variables having the same subscript are related."

Similar presentations


Ads by Google