Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

leap year :)

onkononkon Member Posts: 1

#include
#include

int main(void)
{
int year,b;

printf("Enter the year: ");
scanf("%d",&year);

b=year%4;
if(b==0)
{
printf("Year %d is a leap year",year);getch();
}
else
{
printf("Year %d is not a leap year",year); getch();
}
return 0 ;
getch();
}

Comments

Sign In or Register to comment.