Question: Can someone help me with this? C programming please! Thanks Write a program in C that determines the day number (1-366) in a year for
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. Validate the month and day - based on month, and year. 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 using ONE if statement with 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) Your program must call a displayDateO function that MUST display the output in the following format: Your date, January 31, 2017 is day number 31 Use if and switch statements where appropriate. Once complete upload the source code to our class in Moodle and turn in THIS sheet
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
