Question: Name: Date Date Program Write a program in C that determines the day number (1-366) in a year for a date that is provided by

Name: Date Date Program Write a program in C that determines the day number (1-366) in a year for a date that is provided by the user in the form of 01/31/2017. For example, January 1, 2011 is day 1 and December 31, 2011 is 365. However, December 31, 2012 is day 366 since 2012 was a leap year. You may assume that the user's input is correct and error free at this time. In order to calculate the correct day, your program must include a function called isLeapO that will determine if it is a leap year. The function will return a 1 if it is a leap year and a 0 if it is not a leap year. A leap year must be determined by the following logic A year is a leap year if it is divisible by 4 but not divisible by 100 or is divisible by 400 (ie. The year 1800 is not a leap year - it is divisible by 4 but also divisible by 100, also, it is not divisible by 400). You following format: r program must call a displayDate0 function that will display the output in the Your date, January 31, 2017 is day number 31 Use if and switch statements where appropriate. Once complete, attach a printed copy of the source code and upload the file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
