Hi, I'm a total novice at computing and have been asked to find the highest value in a 2D array.
This is what I have to fill in....
Code:;-------------------------------------------------------------------- ; Given a 2-D array of sales. ; Print out each individual item with a total of the sales for that ; item. ; Print out the name of the item with the ; highest single monthly sale, the month it sold, and the amount. ;-------------------------------------------------------------------- define MAXPRODUCTS = 5 ; Maximum number of products string Product[MAXPRODUCTS] = "WKD", "ICE", "Red Bull", "Rentless", "Monster" integer Sales[MAXPRODUCTS, 2] = 2000, 1650, 1500, 2050, 1800, 1700, 2200, 2400, 1750, 1550 begin ; Print out all items and total for each PrintAll () ; Call procedure to print all ; Find the item with the highest single monthly sale FindHighest () ; Call procedure to find best seller end ;-------------------------------------------------------------------- ; Procedure to print out all the items and the sales ;-------------------------------------------------------------------- procedure PrintAll () end procedure ;-------------------------------------------------------------------- ; Procedure to Find Highest selling product ;-------------------------------------------------------------------- procedure FindHighest () end procedure
Thanks for any help


Reply With Quote

Bookmarks