write a program that enter a 4 digit year test whether it is leap year or not
Answers
Answered by
1
Answer:
#include<iostream>
using namespace std;
int main()
{
int year;
cin>>year;
if((year%4==0||year%400==0)&&(year%100!=0))
{
cout<<year<<" is leap year.";
}else {
cout<<year<<" is not leap year.";
}
}
Explanation:
Similar questions