Sha256: 1357f6f640253ba2e6091f0a34d7d2647b5c28f71514fd8f282893167778f1d8

Contents?: true

Size: 238 Bytes

Versions: 396

Compression:

Stored size: 238 Bytes

Contents

#include <stdbool.h>

bool is_leap_year(int year)
{
   if (year % 4 == 0) {
      if (year % 400 == 0) {
         return true;
      }
      if (year % 100 == 0) {
         return false;
      }
      return true;
   }
   return false;
}

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.0.0.5 tracks/c/exercises/leap/src/example.c
trackler-2.0.0.4 tracks/c/exercises/leap/src/example.c
trackler-2.0.0.3 tracks/c/exercises/leap/src/example.c
trackler-2.0.0.2 tracks/c/exercises/leap/src/example.c
trackler-2.0.0.1 tracks/c/exercises/leap/src/example.c
trackler-2.0.0.0 tracks/c/exercises/leap/src/example.c
trackler-1.0.4.1 tracks/c/exercises/leap/src/example.c
trackler-1.0.4.0 tracks/c/exercises/leap/src/example.c
trackler-1.0.3.0 tracks/c/exercises/leap/src/example.c
trackler-1.0.2.1 tracks/c/exercises/leap/src/example.c
trackler-1.0.2.0 tracks/c/exercises/leap/src/example.c
trackler-1.0.1.2 tracks/c/exercises/leap/src/example.c
trackler-1.0.1.1 tracks/c/exercises/leap/src/example.c
trackler-1.0.1.0 tracks/c/exercises/leap/src/example.c
trackler-1.0.0.1 tracks/c/exercises/leap/src/example.c
trackler-1.0.0 tracks/c/exercises/leap/src/example.c