hello I am new using visual studio 2010
and I doing my home work but I would like some help
this is the program that i have to write
Write a program that estimates how many years, months, weeks, days, and hours have gone by since Jan 1 1970 by calculations with the number of seconds that have gone The number of months must be less than 12, i.e., take out how many years have gone by first, then how many months are left, then weeks, etc.
Assume that all years have 365 days, and all months have 30.42 days
so far this it what I have done
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
main () {
long int now, years, months, weeks, days, secondsperYear;
now = time(NULL);
printf("Seconds = %i \n\n", now);
secondsperYear = 60*60*24*365;
years = now / secondsperYear;
//years = now % secondsperYear;
months = now / (30.42 * days);
//months = (months * (30.42 * day));
weeks = now / weeks;
//weeks = (weeks * week);