Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Sub-Task : Write a function: This function is given the day, month and year and

ID: 642114 • Letter: S

Question

Sub-Task: Write a function:

This function is given the day, month and year and returns the Julian date. The Julian date is the ordinal day number for that day. For example, 1 Jan is day 1 of any year, 31 Dec is day 365 for any non-leap year and 1 Feb is day 32 for any year. Use your days_in_month() function from the previous problem to calculate the Julian date. Put the code for the function julian_date() in the file julian.c, and the prototype in the file julian.h

Write a driver, main(), which asks the user to enter a month, day, year and prints the Julian date. Terminate with EOF. Put the driver in the file driver3.c. You will compile this program with the command:

which will create an executable called driver3.

Explanation / Answer

julian.h



leap.h


days.h