date: 2/23/2010 name: William Schmidt amount, dollars: 23 cents: 30 payee: Office Max your check: William Schmidt 2/23/2010 pay to: Office Max $23.30 twenty three and 30/100 dollarsYou may assume that a person always has the first name and last name (no middle names or initials). The payee name is also always two words. The dollar and cent amount are integers and the amount is always more than 10 dollars and less than 100 dollars. The date is always a single (non white space separated string). Your date, dollar amount in numbers and the word "dollars" have to vertically align.
Note: getline() function appears to be broken in cygwin. Use standard extraction operator to input data.
Hints: You may reuse your code from the number spell assignment to spell out the number of dollars. Putting it in a separate function will make the code more modular. Output appropriate number of spaces in the shorter lines to pad them to the right size so that the information is aligned. To calculate the number of spaces, use the string size function to compute the size of the strings on the left.
Hints: Note that you can recognize words that denote the names of the fields in the database files such as last name: by comparing them to literal string constants or (simpler) you can just exploit the fixed order of the fields, read these names and immediately discard them. That is, we already know that the name would the the forth and fifth string input and the cent amount is the tenth. So you only need to process the fifth string, the tenth string and so on.