Question: Using C program not C++ and needs to be able to compile correctly through an Apple Macbook. Write a function: int julian_date(int day, int month,
Using C program not C++ and needs to be able to compile correctly through an Apple Macbook.
Write a function: int julian_date(int day, int month, int year);
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.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
