This code is c++ and the goal of it is to convert the normal dates (start and end dates) into Julian dates and find the date difference between the two dates.

#include

// Given a month, day, and year, calculate the Julian day number using the
// Fliegel & Van Flandern equation.
int JulianDay(int month, int day, int year) {
// TODO: write statements to implement this function, and delete this comment
return 0; // TODO: replace this return statement with one that actually works
}

// Return the number of days between a start date and end date.
int DateDifference(int start_month, int start_day, int start_year,
int end_month, int end_day, int end_year) {
// TODO: write statements to implement this function, and delete this comment
return 0; // TODO: replace this return statement with one that actually works
}

// Print the given date to standard output in the format MM/DD/YYYY
void PrintDate(int month, int day, int year) {
// TODO: write statements to implement this function, and delete this comment
}

int main(int argc, char* argv[]) {
// TODO: prompt the user for
// - start month
// - start day
// - start year
// - end month
// - end day
// - end year

// TODO: call DateDifference, and store its return value in a variable

// TODO: output "The number of days between"
// TODO: call PrintDate to print out the start date
// TODO: output " and "
// TODO: call PrintDate to print out the end date
// TODO: output " is DAYS days\n", where DAYS is the difference claculated
// by DateDifference above

return 0;
}

Respuesta :

Otras preguntas