Leap year program in C

Advertisements

Prev Tutorial Next Tutorial

Program to Check Leap Year in C

A leap year is a year containing one additional day that means in leap year 366 day. and leap year are divisible by 4 so if you write any program to check leap year check year must be divisible by 4.

Program to check leap year

#include<stdio.h>
#include<conio.h>

 void main()
 {
 int y;
 printf("Enter any year: ");
 scanf("%d",&y);
if(y%4==0)
{
printf("Leap year");
}
else
{
printf("Not a leap year");
}
getch();
}

Output

Enter any 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