Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write the program in C language please. and also follow the instructions given on the question. to determine the leapyear it should include a function

image text in transcribed

write the program in C language please. and also follow the instructions given on the question. to determine the leapyear it should include a function called isleap () and also use the given logic on the question to determine leapyear. moreover, it is our very first weeks assaignment. So please don't use string, array or pointer anything like that. all we have learned is function and switch stament and if statement. thank you. the output should be also similar to format given on the 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 the user in the form of 10/22/2012. 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 isLeap0 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 4000. Your program must call a display Dateo function that will display the output in the following format: Your date January 31, 2014 is day number 31 Use if and switch statements where appropriate. Once complete, attach a printed copy of the source code and a copy of the output using the following date testing: 07/10/2000

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

More Books

Students also viewed these Databases questions

Question

2. (1 point) Given AABC, tan A b b

Answered: 1 week ago

Question

5 The mechanics of the circular flow model.

Answered: 1 week ago

Question

1 The difference between a command system and a market system.

Answered: 1 week ago

Question

4 How the market system adjusts to change and promotes progress.

Answered: 1 week ago