Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Leap year program

#include <stdio.h>

int main() {
   int year;
   year = 2016;

   if (((year % 4 == 0) && (year % 100!= 0)) || (year%400 == 0))
      printf("%d is a leap year", year);
   else
      printf("%d is not a leap year", year);

   return 0;
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #Leap #year #program
ADD COMMENT
Topic
Name
2+9 =