Skip to content

Instantly share code, notes, and snippets.

@Dastagirireddy
Created November 17, 2018 11:00
Show Gist options
  • Save Dastagirireddy/acaeca2bf8deb590ab050d45cbeb1189 to your computer and use it in GitHub Desktop.
Save Dastagirireddy/acaeca2bf8deb590ab050d45cbeb1189 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include "stdio.h"
int main()
{
int y;
puts("Enter the year:");
scanf("%d",&y);
if((y%4==0 && y%100!=0) || y%400==0)
{
printf("Leap year");
}
else{
printf("Not a leap year");
}
printf("The year is:%d",y);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment