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 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
#include <iostream>
#include <string>
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <iomanip>
using namespace std;
int main()
{
int hunds, tens, ones;
const int size = 7;
char amountin[size];
string mname, cdate;
cout << "Enter the date of the check:";
getline(cin, cdate);
cout << "Enter name, a blank, last name: ";
getline(cin,mname);
cout << "Enter the Amount as XXX.XX, Enter leading and trailing 0's: ";
cin >> (amountin);
for(int i=0; i <(amountin[i]); i++)
{
hunds= amountin[0];
tens= amountin[1];
ones= amountin[2];
}
cout << "hunds: " <<static_cast<int> (hunds) << endl;
cout << "tens: " << static_cast<int> (tens) << endl;
cout << "ones: " << static_cast<int> (ones) << endl;
string oneplace[11] = {" ","one", "two", "three", "four", "five", "six","seven", "eight", "nine"} ;
string tenplace[11] = {" ","ten","twenty","thirty","fourty","fifty", "sixty", "seventy", "eighty", "ninety"};
string hundred[3] = {" ","hundred"};
//------------------------------------SIMULATED CHECK-------------------------------------------------------------------
cout << endl;
cout << setw(50) << cdate << endl;
cout << endl;
cout << endl;
cout << "pay to the order of: " << mname << setw(15) << "$ " << amountin;
cout << endl;
cout << endl;
cout << endl;
system("pause");
return 0;
}
|