I am trying to calculate how many seconds elapsed since a month/year inputed by the user
I want to use time.h only for this exercise!!!
I also have to account for century leap year as defined in #define
This is my codes so far...don't know how to make it work
Any suggestions!!!
Code:
#include <stdio.h>
#include <time.h>
#define LEAP(yy) ((yy)%400==0)
int main(void)
{
char *line;
int mm,dd,yyyy;
printf("enter date:");
gets(line);
elapsed= double difftime(time_t t1,time_t t0);
t0=current date & time;
t1=line;
printf("%3.1lf %s\n", elapsed, "seconds");
return 0;
}