Skip to content

Instantly share code, notes, and snippets.

@esthicodes
Created August 24, 2021 01:11
Show Gist options
  • Save esthicodes/5cead0a9438c2449b154e7b5221f82b4 to your computer and use it in GitHub Desktop.
Save esthicodes/5cead0a9438c2449b154e7b5221f82b4 to your computer and use it in GitHub Desktop.
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
int main()
{
int y,leap;
scanf("%d",&y);
leap=0;
if (y % 4 == 0) leap=1;
if (y > 1918)
{
if (y % 100 == 0) leap=0;
if (y % 400 == 0) leap=1;
}
if (y != 1918)
{
if (leap == 0) printf("13.09.%d\n",y);
else printf("12.09.%d\n",y);
}
else printf("26.09.%d\n",y);
// your code goes here
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment