Page 1 of 1

Question 3 7 mut of 14 pos We are gives an ingin file caned prices.txt the ischides in each line omNumber of type intege

Posted: Sun Jul 03, 2022 9:58 am
by answerhappygod
Question 3 7 Mut Of 14 Pos We Are Gives An Ingin File Caned Prices Txt The Ischides In Each Line Omnumber Of Type Intege 1
Question 3 7 Mut Of 14 Pos We Are Gives An Ingin File Caned Prices Txt The Ischides In Each Line Omnumber Of Type Intege 1 (26.89 KiB) Viewed 25 times
Question 3 7 Mut Of 14 Pos We Are Gives An Ingin File Caned Prices Txt The Ischides In Each Line Omnumber Of Type Intege 2
Question 3 7 Mut Of 14 Pos We Are Gives An Ingin File Caned Prices Txt The Ischides In Each Line Omnumber Of Type Intege 2 (34.67 KiB) Viewed 25 times
Question 3 7 Mut Of 14 Pos We Are Gives An Ingin File Caned Prices Txt The Ischides In Each Line Omnumber Of Type Intege 3
Question 3 7 Mut Of 14 Pos We Are Gives An Ingin File Caned Prices Txt The Ischides In Each Line Omnumber Of Type Intege 3 (34.67 KiB) Viewed 25 times
We are given an input file named "prices.txt' that includes in each line an itemNumber (of type integer) followed by the price (of type integer) of that item. We can haveup to 500 different items. Also we are given an input file named sales.txt" such that each line of the file contains two integer values where the first value is thenumber_ of Items sold of an item (integer) and the second value is the itemNumber.Write C++ statements that compute the total_ sales of each item based on the information given in the two input files "prices.txt* and "sales.txt". In addition,for each item with total_ sales larger than 0, the C+ + statements output to the screen the itemNnumber followed by the total_ sales of that item. total_ sales of an item iscalculated as the total number of sales for that item times the price of the item.As an example: If "prices.txt has the following two lines, where the first lines indicates that item number 3 price is 5 and the second line indicates that item number 1price is 10.35110If *sales.txt" includes the following three lines (the first line indicates that the number of items sold is 2 for itemNumber 1, and the second line states that number ofitems sold is 2 for itemNumber 3, and the last line states another sales transaction of item number 1; mainly it states that the number of items sold is 4 for itemNumber 1.212341Then, for this example, the C++ statements should output to the screen the following two lines, the first line indicates that the total sales of item number 1 is 60 AED andthe second indicates that the total sales of item number 3 equals 10.Item 1 total sales is 60 AEDItem 3 total sales is 10 AED
We are given an input file named "prices.txt' that includes in each line an itemNumber (of type integer) followed by the price (of type integer) of that item. We can have
up to 500 different items. Also we are given an input file named sales.txt" such that each line of the file contains two integer values where the first value is the
number_ of Items sold of an item (integer) and the second value is the itemNumber.
Write C++ statements that compute the total_ sales of each item based on the information given in the two input files "prices.txt* and "sales.txt". In addition,
for each item with total_ sales larger than 0, the C+ + statements output to the screen the itemNnumber followed by the total_ sales of that item. total_ sales of an item is
calculated as the total number of sales for that item times the price of the item.
As an example: If "prices.txt has the following two lines, where the first lines indicates that item number 3 price is 5 and the second line indicates that item number 1
price is 10.
35
110
If *sales.txt" includes the following three lines (the first line indicates that the number of items sold is 2 for itemNumber 1, and the second line states that number of
items sold is 2 for itemNumber 3, and the last line states another sales transaction of item number 1; mainly it states that the number of items sold is 4 for itemNumber 1.
21
23
41
Then, for this example, the C++ statements should output to the screen the following two lines, the first line indicates that the total sales of item number 1 is 60 AED and
the second indicates that the total sales of item number 3 equals 10.
Item 1 total sales is 60 AED
Item 3 total sales is 10 AED
Question 3 7 mut of 14 pos We are gives an ingin file caned prices.txt the ischides in each line omNumber of type integer) followed by the price (od type uneger) of that dem We can have tp to 500 differat itens. Also we are gives an inpot file named "sales.txt" such that each line of the file contains two integer vales where the Ses valce is number of Rema sold of a them integer) and the second valse is the MemNumber We C++ statements that compute the total sales of each item based on the information given in the two gut files "prices.txt" and sales.txt In aktris for each item with total sales larger than 0, the C ents output to the screen die itemNinumber followed by the total sales of that nem total sales calculated as the total number of sales for that set times the price of the ave Ametangle tf prices.tat has the following two line, where the first finns interes that en sumber 3 price is 5 and the second to indicates that price is 10 35 1.10 If sales.tat includes the following these lines (the first line indices that the aber of items sold is 2 for itemNumber 1, and the second line stat sold is 2 for itemNumber 3, and the last lite sta acocher sales transaction of a saber 1, mainly in states that the minber of ems soll it 4 for Number 21 23 41 statements should outpot to the terms the following two ines, the first line indicates that the al sales of item uber 160 ALD and de steend indicates that the total sales of item mber 3 equals 10. The for this example the 1 stal sales is to AED Item 3 sotal sales is 10 AED
Question 3 We are given an input file and prices.txt ut iodades in each line sa temNumber (ef type istagers followed by the price of type utepe) of that up to 500 difet is. Also we are given an input file named "sales.txtch that each line of the file contains two integer valses where the fint vale number of tema sold of mile Goneger) the socd valit Number White C++ statements that ap for each with total sales larger t total aber of sales for th As an example If "prices.txt him the following two lion, where the fint les indicates that in mmber 3 price is 5 and the second line indicates that 1 price is 10. 35 110 If sales.tat ocades the following the lines (the first line indicates that de ber of es sold is 2 for itemNumber 1, and the second line states that number of tras sold in 2 for demNumber 3, and the last line data anoder sales action of its a mainly states that the number of seld is for bemNumber L 21 23 41 Theis for this example, the C++ should ourpot to the scene the following two las de fiest the second indicates that the total sales of item ber 31 Ben 1 soal sales is 60 AED in 3 total sales is 10 AED Nates Deal the total sales each items based on the information gives is the two input files prices.txt and sales.txt. In addition to the seems the bemNnumber followed by the total sales of that in total sales Question 4 declars, open c ponit feedback None Cen Tout of 14 pos We cas ave y You sev gives teo inpet les int.tt and at tt dat eich kan geves that are slevy SORTED White Canons that option of sorted order br 160 AED 7) por