String processing

I'm trying to practice for my coding quiz when I face with this problem. I have no idea how to code this so can somebody please help me out? Details below.

PHOTOCOPYING

Format: The first line contains the number of records, N (1 ≤ N ≤ 200). Each of the following N lines represents a record of the photocopying machine. The fee for each copy is 20 cents. In each line, the first 15 characters represent a student's name in capital letters. The next two characters represent the number of copies made. You should note that there is a space before a 1-digit number.

EXAMPLE 1:
input:
4
MARY 20
JONATHAN 13
MARY 38
ADA 7

output:
STUDENT AMOUNT
-----------------------
MARY 11.60
ADA 1.40
JONATHAN 2.60

I'm stuck with the storing of names and outputting the names. Please help. Thanks a lot!
Sorry but there should be spaces after names, the editor won't let me enter spaces.
For Mary, there should be 11 spaces after in the input session.
For Jonathan, 7 spaces after in the input session.
etc.
use stringstream.
store the names in a std::string, and the number of copies in an int.

For Mary, there should be 11 spaces after in the input session.
For Jonathan, 7 spaces after in the input session.

what dictates how many spaces you require?
The first 15 characters is stored as the names.
For Mary, 15-4=11
For Jonathan, 15-8=7
Topic archived. No new replies allowed.