PROGRAM TO FIND LEAP YEAR

C, C++, etc Programing examples. Post as many you can. Test the programs and discuss about the output of the programes.
Forum rules
Please Discuss & post only about the programes and its Output

PROGRAM TO FIND LEAP YEAR

Postby charulatha » Tue Apr 13, 2010 2:29 pm

/* LEAP YEAR */

#include<stdio.h>
#include<conio.h>
main()
{
int year;
printf("Enter an year\n");
scanf("%d",&year);
if(year%4==0 && year%100!=0||year%400==0)
printf("This is a leap year\n");
else
printf("This is not a leap year\n");
getch();
}
Regards,
Charulatha.
User avatar
charulatha
Moderator
 
Posts: 669
Joined: Sat Oct 17, 2009 2:54 pm
membership: Senior Technician of The Institution of Engineers (India)- ST

ad
 

Return to Computer Notes : Some Sample Programs

Who is online

Users browsing this forum: No registered users and 0 guests