Category : Files from Magazines
Archive   : CUJ9302.ZIP
Filename : 1102131B

 
Output of file : 1102131B contained in archive : CUJ9302.ZIP
// tdate3.cpp

#include
#include
#include "date3.h"

main()
{
int m, d, y, nargs;

// Read in two dates - assume 1st precedes 2nd
fputs("Enter a date, MM/DD/YY> ",stderr);
nargs = scanf("%d/%d/%d%*c", &m,&d,&y);
if (nargs != 3)
return EXIT_FAILURE;
Date d1(m,d,y);

fputs("Enter a later date, MM/DD/YY> ",stderr);
nargs = scanf("%d/%d/%d%*c", &m,&d,&y);
if (nargs != 3)
return EXIT_FAILURE;
Date d2(m,d,y);

// Compute interval in years, months, and days
Date *result = d1.interval(d2);
printf("years: %d, months: %d, days: %d\n",
result->get_year(),
result->get_month(),
result->get_day());
return EXIT_SUCCESS;
}



  3 Responses to “Category : Files from Magazines
Archive   : CUJ9302.ZIP
Filename : 1102131B

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/