C++ Program to Check Leap Year

Advertisements

Prev Tutorial Next Tutorial

C++ Program to Check Leap Year

A Leap Year is a year containing one additional day that means in that year 366 day. and these year are divisible by 4 so if you write this program must be check year divisible by 4.

C++ Program to Check Leap Year


#include<iostream.h>
#include<conio.h>

 void main()
  {
 int y;
 cout<<"Enter a year: ";
 cin>>y;
if(y%4==0)
{
cout<<"Leap Year";
}
else
{
cout<<"Not a Leap Year";
}
getch();
}

Output

Enter a year: 2004
Leap Year

Prev Tutorial Next Tutorial

Google Advertisment

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements