I am trying to write C++ code that counts the number of years, months, weeks, hours and minutes from Jan 1, 1970. I am including the code I currently have. Please help me. Thanks in advance.

```
#include <stdio.h>
#include <stdlib.h>  
#include <time.h>

int main(){

double seconds, minutes, days, weeks, months, years, hours;

seconds = time(NULL); 
minutes = seconds / 60;
hours = minutes / 60;
days = hours / 24;
weeks = days / 7;
months = weeks / 4;
years = days / 365;

months = (int) (days / 30.42) % 12;
weeks = (int) (days / 7) % 52;
days = (int) (hours / 24) % 24;
hours = (int) (minutes / 60) % 1;
minutes = (int) (seconds / 60) % 60; 

printf("%d years \n", (int)years); 
printf(" %d months \n", (int)months);
printf(" %d weeks\n", (int)weeks);
printf(" %d days \n", (int)days);
printf(" %d minutes\n", (int)minutes);
printf(" %d hours\n\n", (int)hours);

system("pause");
}

```