c++ check please help

3) We would like to write a check. Input the following:
Date, Payee, Amount, and the account holder. Output these
in the following format, but the amount needs to be output
numerically as well as grammatically just like a check.
Range for the check amount = $1 to $1999 (integers, no
cents)

Input the following 4 values
Date: 01/01/15
Payee: John Doe
Amount: $811
Account Holder: Jane Doe


Output a written check

Jane Doe
STREET ADDRESS
CITY, STATE ZIP Date: 01/01/15

Pay to the Order of: John Doe $ 811.00

Eight Hundred Eleven and no/100s Dollars

BANK OF CSC5

FOR: GOTTA PAY THE RENT Jane Doe
What questions do you have? Where is your working code?
Eight Hundred Eleven and no/100s Dollars

That's the only tricky part. Give it a try and, if you're stuck, ask again.
The rest is pretty simple, you can start for example with a scheme like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// 3) We would like to write a check. Input the following:
// Date, Payee, Amount, and the account holder. Output these
// in the following format, but the amount needs to be output
// numerically as well as grammatically just like a check.
// Range for the check amount = $1 to $1999 (integers, no
// cents)

// Input the following 4 values
// Date: 01/01/15
// Payee: John Doe
// Amount: $811
// Account Holder: Jane Doe


// Output a written check

// Jane Doe
// STREET ADDRESS
// CITY, STATE ZIP Date: 01/01/15

// Pay to the Order of: John Doe $ 811.00

// Eight Hundred Eleven and no/100s Dollars

// BANK OF CSC5

// FOR: GOTTA PAY THE RENT Jane Doe

#include <iostream>
#include <string>

int main()
{
   std::cout << "\nCheck forger program :-)\n";
   std::cout << "========================\n";

   // Input data
   std::cout << "Please enter check date: ";
   std::string date = 0;
   std::cin >> date;

   // ...
   // same as above for payee, amount, holder, street, city, state, zip...
   // ...

   // Output data
   std::cout << payee << '\n' << street << '\n' << city << ", "
             << state << ' ' << zip ... ; <-- to be finished

   std::cout << "Pay to the order of: " << holder << ' ' << amount  '\n';
   // ...keep going like that

   return 0;
}
Topic archived. No new replies allowed.