Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using C++. Write a program that can be used to check if a year is leap year or not. In order to check this apply

using C++.

Write a program that can be used to check if a year is leap year or not. In order to check this apply the following algorithm:

Check if the year is divisible by 4 but not divisible by 100, then display it is a leap year, otherwise check if year is divisible by 400, then display it is a leap year, otherwise display it is not a leap year.

Your input is only one, that is the value of the year.

Program must be tested with at least 5 sets of data. To do that either you can run the program five times, or use a loop five times, and inside the loop put the input statement to get the value of year, and put the entire algorithm also inside the loop.

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

Sybase Database Administrators Handbook

Authors: Brian Hitchcock

1st Edition

0133574776, 978-0133574777

More Books

Students also viewed these Databases questions