I have a text file name Mail order.
The order in the text file is:
101,3,49.99
103,5,2.75
101,8,49.99
the first column (101,103) is the item number, the second column is the quantity per item, and the third one is the price of each item number.
the instruction is to get the total sum of the quantity. in the given example the total sum is 16.
another instruction is to get the total of the price so first i have to add the 3 different prices and divide it to 3.
so the big question i had is how to read the text file line by line by the second word and third word only...
any help would be appreciated..
The order in the text file is:
101,3,49.99
103,5,2.75
101,8,49.99
the first column (101,103) is the item number, the second column is the quantity per item, and the third one is the price of each item number.
the instruction is to get the total sum of the quantity. in the given example the total sum is 16.
another instruction is to get the total of the price so first i have to add the 3 different prices and divide it to 3.
so the big question i had is how to read the text file line by line by the second word and third word only...
any help would be appreciated..
