Skip to content
Snippets Groups Projects
Select Git revision
  • f82db55e55a29f63e5d3395a97c7dc0a7811c143
  • 2025ss default
  • 2024ss
  • 2023ws
  • 2022ws
  • 2021ws
  • 2020ws
  • 2019ws
  • 2019ss
  • 2018ws
  • 2017ws
  • 2017ss
  • 2016ws
  • 2016ss
  • 2015ss
15 results

loesung-1.1-02.c

Blame
  • loesung-1.1-02.c 507 B
    #include <stdio.h>
    
    int main (void)
    {
      int year = 42;
      if (year % 4 == 0)
        {
          if (year % 400 == 0)
            {
              printf ("%d ist ein Schaltjahr.\n", year);
              return 0;
            }
          else if (year % 100 == 0)
            {
              printf ("%d ist kein Schaltjahr.\n", year);
              return 0;
            }
          else
            {
              printf ("%d ist ein Schaltjahr.\n", year);
              return 0;
            }
        }
      else
        printf ("%d ist kein Schaltjahr.\n", year);
      return 0;
    }