Write a C program to check leap year using if else.
Example
Input
Input year: 2004
Output
2004 is leap year.
/**
* C program to check Leap Year
*/
#include <stdio.h>
int main()
{
int year;
/* Input year from user */
printf("Enter year : ");
scanf("%d", &year);
/*
* If year is exactly divisible by 4 and year is not divisible by 100
* or year is exactly divisible by 400 then
* the year is leap year.
* Else year is normal year
*/
if(((year % 4 == 0) && (year % 100 !=0)) || (year % 400==0))
{
printf("LEAP YEAR");
}
else
{
printf("COMMON YEAR");
}
return 0;
}
/*
Output :
Enter year : 2004
LEAP YEAR
*/
Good web site you have here.. It’s hard to find quality writing like yours these days.
I really appreciate people like you! Take care!!
my blog :: how to copy a text message on an iphone
Your method of telling all in this paragraph is actually good, every one can effortlessly understand it,
Thanks a lot https://shaik.ca/es/quienes-somos/
Your mode of describing all in this paragraph is actually
nice, every one can easily be aware of it, Thanks a lot https://www.cabanoneco.ca/
As I lay still and breathed in the calming aroma, I felt all the chaos and
tension of my week slowly melt away, leaving only stillness and
gratitude at 여성전용마사지.