Computer Science, asked by skyboy1, 1 year ago

write a c++ program to check whether the given year is a leap year

Answers

Answered by bulzy
15
#include <iostream.h>
void main()
{
int year;
court<<"Year?";
cin>>year;
if(year%4==0 && year%100!=0 || year%400==0)
cout<<"Leap year";
else
cout<<"Not a leap year";
}
Answered by shashwat14
3
void main()
{
clrscr();
int j;
cout<<"please enter the year which you want to check"<<endel;
cin>>j;
if(j%4==0);
{
cout<<"it is a leap year.";
}
else
{
cout<<"it is not a leap year.";
}
getch();
}

bulzy: noob
Similar questions