Advertisement
coolizer

My leapYear function

Mar 14th, 2014
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.48 KB | None | 0 0
  1. //Date: 14-03-2014
  2. //Leap Year Function
  3. //1581, 1582, 1900, 1990, 1999, 2000, 2014, 4000
  4.  
  5. #include <stdlib.h>
  6. #include <stdio.h>
  7. #include <assert.h>
  8. #define START_OF_GREG_CALENDAR 1582
  9.  
  10. int isLeapYear (int year)
  11. int main (int argc, char* argv []) {
  12.    printf ("Please enter a year after 1582\n");
  13.    if (year < 1582) {
  14.      printf ("Please enter a year greater than 1582\n");
  15.     }else{
  16.      scanf ("%d", year)
  17.    if ((year % 400)==0){
  18.      if ((year % 100) ==0 {
  19.  
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement