Social Icons

Sunday, 9 February 2014

Program to find whether a given year is a leep year or not

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

void main()
{
int year;
clrscr();     //to clear the screen

printf("\n Enter any year(4-digit) : ");
scanf("%d",&year);

if((year%400==0)||(year%100!=0) && (year%4==0))
     printf("\n Year %d is Leep Year",year);
     else
        printf("\n Year %d is Not a Leep Year",year);
getch();     //to stop the screen
}


                                                    Output

No comments:

Post a Comment