Reading file data and manipulating it

Hello All

Could anyone please help me with solving the problem below?

File Data format
A,A
A,B
C,E
C,F
And so on ... it could be up to any alphabet. The number of As and Bs and Cs and Ds in first column depends on the number of unique alphabets used in the first column. For example the unique alphabets used in this case are 2 (A,C) hence each alphabet appears in the first column of consecutive 2 rows.

Which means
1
2
3
4
A:A,B,C,D
B:B,C,D,E
C:C,D,E,F
D:D, ,F,G (E is missing)

Actual Data
A,1
A,2
A,3
A,4
C,18
C,33
Final Solution: Add each integer value to its previous value and store the resulting value.

Could anyone please help me achieve this final solution?
Thanks
Last edited on
Could you please explain again
Topic archived. No new replies allowed.