C++ Program to Check Leap Year


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 Advertisements
Download Projects

Google Adsense Advertisements

Buy 3 Year Old Domain, Tutorialday.com, SeosmoTools.com @$200

Buy This Ad Space @$50 per Month, Ad Size 300X250 Contact on: hitesh.xc@gmail.com WhatsApp no. 8882538826

Yahoo Advertisements