EmbLogic's Blog

leap year or not

#include <stdio.h>
int main()
{
int year;
printf(“enter year\n”);
scanf(“%d”, &year);
if(year % 4==0 || year % 100== 0)
printf(“it is leap year\n”);
else
printf(“it is non leap year\n”);

return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>