C Program Leap Year MCA Sem 1

This C program finds if the input year is a Leap Year or not. This is a part of Mumbai University MCA Colleges C programs MCA Sem 1.
Leap year is any year which is divisible by 4.

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

void main()
{
clrscr();
int year;
printf("Enter the year to find if it is leap year or not:");
scanf("%d",&year);
if(year%4==0&&year%100!=0||year%400==0)
{
printf("The year entered is a leap year.");
}
else
{
printf("The year entered is not a leap year.");
}
getch();
}

Hope this Program is useful to you in some sense or other. Keep on following this blog for more Mumbai University MCA College Programs. Happy Programming and Studying.

No comments:

Post a comment