Skip to content
Snippets Groups Projects
Select Git revision
  • 9ab3e5548c06f58b28fa71fa386dc54f3e119cfe
  • master default protected
2 results

README.md

Blame
  • loesung-1-5.c 320 B
    #include <stdio.h>
    
    int main (void)
    {
      int year;
      printf ("Bitte geben Sie eine Jahreszahl ein: ");
      scanf ("%d", &year);
      if (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0))
        printf ("Das Jahr %d ist ein Schaltjahr.\n", year);
      else
        printf ("Das Jahr %d ist kein Schaltjahr.\n", year);
      return 0;
    }