Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started