Ok, I am very new to c programming and have a little problem. I am currently using the pico editor in UNIX and here is my problem:
I have to calculate total revenue through a daily record of sales that looks like this:
100 soap 15 0.98
101 tape 25 0.35
102 cds 5 13.95
103 disks 8 1.50
104 books 4 8.95
105 mice 25 7.75
106 pens 40 3.95
107 erasers 12 0.92
108 staples 20 0.38
109 paper 9 3.92
110 candy 18 1.50
111 gum 40 0.95
112 soda 25 0.75
113 pretzels 40 1.95
114 pencils 100 0.25
First bumber is transaction number, second set of characters is the item, third is number of items sold, and last one is price. This data is stored in a text file which I must reassign the standard input to when I run the program to get the numbers. In my program, how do I isolate only the number of items sold and the price of each item so i can find the total daily transactions? Don't need entire code, just some suggestions on how to do this. Thanks