What have you written so far?
Are you having problems
- reading the record
- parsing the record
- doing the calculations
- storing the results
- displaying the results
On the other hand, if you want us to write the program for you may have come to the wrong place...