Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 5: 10 Marks Write a program that display Leap year. In main () function take an input from user. Write a function that returns

image text in transcribed

Question 5: 10 Marks Write a program that display Leap year. In main () function take an input from user. Write a function that returns true if and only if the unsigned int Y represents a leap-year. There are two rules for determining leap years (Y is a century-year if it is evenly divisible by 100): Rule 1: If Y is a century-year, then Y is a leap-year just if it is evenly divisible by 400. For example, century-years 1700, 1900, 1800, and 3400 are not leap-years since they are not divisible by 400. But the century-years 1600, 2000, and 2400 are leap years because they are evenly divisible by 400. Rule 2: If Y is not a century-year, then it's a leap year if it's evenly divisible by 4. Note: Use pointers and switch statement in program

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

What Is A Database And How Do I Use It

Authors: Matt Anniss

1st Edition

1622750799, 978-1622750795

More Books

Students also viewed these Databases questions