Advertisement
riggnaros

birthday_main

Apr 22nd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include "birthday_header.h"
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     string enterM = 0;
  10.     int enterD = 0;
  11.     int enterY = 0;
  12.     char anyKey;
  13.  
  14.     birthday converter(enterM, enterD, enterY);
  15.  
  16.     cout << "Please enter your birtday in the following format: (8-15-1995)\n";
  17.     cout << "Month(1-12): \n";
  18.     cin >> enterM;
  19.     cout << "Day(1-31): \n";
  20.     cin >> enterD;
  21.     cout << "Year(ex: 2001): \n";
  22.     cin >> enterY;
  23.  
  24.     converter.setMonth(enterM);
  25.     converter.setDay(enterD);
  26.     converter.setYear(enterY);
  27.  
  28.     converter.convertBirthday();
  29.  
  30.     cout << endl;
  31.     cout << "press any key to exit.\n";
  32.     cin >> anyKey;
  33.  
  34.  
  35.  
  36.     return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement