When I type in the date it is putting the Sept. in the date spot but it is putting 30, 2007 in the pay to the order slot. Any ideas why?
Also, when it asks for my input it asks for the date just fine but then all on the same line it asks Enter first name: Enter last name: Enter amount:
Any ideas would be helpful.
Code:
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
string todaysDate;
string firstName;
string lastName;
double amount;
void enterData();
void printCheck();
int _tmain(int argc, _TCHAR* argv[])
{
enterData();
printCheck();
return 0;
}
void enterData()
{
cout << "Enter today's date: ";
cin >> todaysDate;
cout << "Enter the first name: ";
cin >> firstName;
cout << "Enter the last name: ";
cin >> lastName;
cout << "Enter the amount: ";
cin >> amount;
cout << endl << endl;
}
void printCheck()
{
cout << "Zzyz Corp Date: "<< todaysDate <<endl;
cout << "1164 Sunrise Avenue "<<endl;
cout << "Kalispell, Montana\n "<<endl;
cout << "Pay to the order of:" << firstName << lastName << "$" << amount << endl;
cout << "UnderSecurity Bank "<<endl;
cout << "Missoula, MT "<<endl;
cout << " ____________________"<<endl;
cout << " Authorized Signature";
cout << endl << endl;
}