Have a Read!

Hi Everyone.
The idea for this page is to provide new c users simple c tutorials to learn how to develop the logic and more importantly correct way to write syntax.
ENJOY !!!

Thursday, January 27, 2011

C PROGRAM FOR LEAP YEAR

#include<stdio.h>
int main() {
int year;
printf("ENTER THE YEAR\n");
scanf("%d",&year);
if ((year%4==0)&& (year%100!=0))
{printf("%d is a leap year\n",year);}
else
printf("%d is not a leap year\n",year);
return 0;
}

No comments:

Post a Comment

Related Posts with Thumbnails