no actualy i didnt starrt nothing i dont know the formula to use i have to calculate the number of seconds elapsed between two times intervals...
for example i define a date for example from 1/1/2005 and i ask the user to put the year month day (yyyy mm dd) and the hour min sec (hh mm ss) and then i want to calculate the number of seconds elapsed betwen the given date from the user and the 1/1/2005!!
There are 60 seconds in a minute.
There are 60 minutes in an hour.
There are 24 hours in a day.
There are either 365 or 366 days in a year.
Compute the number of days between 01/01/2005 and the date the user entered. Multiply by 24 * 60 * 60 = 86400 to get a number of seconds. Add to that result the number of seconds elapsed in the day the user entered.
really thanks but i need somethink more detailed and more extended.... and im a bigginer and i dont know how to use libraries....so is a little bit difficult for me
{
//Declaring the Variables
int year, month, days, hours, minutes, seconds;
cout << "Your year must be 2000 or greater";
do
{
cout << "Please enter a date in format (YYYY MM DD)";
cin >> year >> month >> days;
do
{
cout << "Please enter the valid year (example YYYY)";
cin >> year;
cout << "Please now enter the month (example MM)";
cin >> month;
cout << "And now enter the day (example DD)";
cin >> day;
}
this is what i done until now im really bored i dont know how to keep going can anybody help me???