Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

leap year in c

#include <stdio.h>
void
main ()
{
  int year;
  printf ("
 enter year to be checked for leap");
  scanf ("%d", &year);

  if (year % 4 == 0)
    {
      printf ("
 %d is leap year yay!", year);
    }
  else
    {
      printf ("
 year enterd is not leap, waaa :-(");
    }
}
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #leap #year
ADD COMMENT
Topic
Name
7+9 =