Skip to content
Snippets Groups Projects
Select Git revision
  • 4ff440eaac9aee21bd0a6c7f5ce7927ee4cd9b94
  • master default
2 results

hanoi-3.c

Blame
  • Forked from Peter Gerwinski / hp
    Source project has a limited visibility.
    loesung-1.1-09.c 358 B
    #include <stdio.h>
    
    int main (void)
    {
      int year = 42;
      printf ("Jahr: ");
      scanf ("%d", &year);
      if (year <= 1752)
        printf ("Zulässige Jahreszahlen: größer als 1752.\n");
      else if (year % 4 == 0 && (year % 400 == 0 || year % 100))
        printf ("%d ist ein Schaltjahr.\n", year);
      else
        printf ("%d ist kein Schaltjahr.\n", year);
      return 0;
    }