Advertisement
Guest User

Untitled

a guest
Jan 31st, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.85 KB | None | 0 0
  1. //Objective: Calculate how many days old I will be on the due date of this lab.
  2. //Name: Ian Chess
  3. //Course: COMSC-110-8215
  4. //Compiler: MS Visual Studio 2013
  5. //Editor: JNotePad
  6.  
  7. //libraries
  8. #include <iostream>
  9. #include <string>
  10. using namespace std;
  11.  
  12. //Programmer defined data types
  13. //NONE
  14.  
  15. //Special compiler dependent definitions
  16. //NONE
  17.  
  18. //global constants/variables
  19. //NONE
  20.  
  21. //Programmer defined functions
  22. //NONE
  23.  
  24. //main program
  25. int main()
  26. {
  27.   // output my name and objective and program information
  28.   cout << "Objective:.Calculate how many days old I will be on the due date of this lab.\n";
  29.   cout << "Programmer: Ian Chess\n";
  30.   cout << "Editor(s) used: Notepad\n";
  31.   cout << "Compiler(s) used: VC++ 2013 Express\n";
  32.   cout << "File: " << __FILE__ << endl;
  33.   cout << "Complied: " << __DATE__ << " at " << __TIME__ << endl << endl;
  34.  
  35.   //variables
  36.   int days = yearsOld * 365 + leapYears + (365 - daysToEndOfYear); // number of days how old I am on the day this lab is due
  37.   int yearsOld = 28; // number of years old I am
  38.   int leapYears = yearsOld/4;; // number of leap years from birth year to this year
  39.   int julianBirthdate = 10227; // number of days up to and including my birthday in my birth year
  40.   int daysToEndOfYear = 334; // number of days from lab due date until the end of the year
  41.   int julianDueDate = "February 1st, 2015"; // date of the due date
  42.   string DOB = "January 27th, 1987"; // My date of birth
  43.   dueDate = "February 1st, 2015"; // due date of the lab
  44.   string dateOfBirth = "Date of Birth:"; //label for date of birth
  45.   string dueDate = "Due Date:"; // label for due date
  46.   string ageInDays "Age In Days:"; // label for age in days
  47.  
  48.   cout <<
  49.   cout << dateOfBirth << endl;
  50.   cout << DOB << endl;
  51.   cout << dueDate << endl;
  52.   cout << julianDueDate << endl;
  53.   cout << ageInDays << endl;
  54.   cout << days << endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement