This program find that where entered year is leap year or not. Leap year means year in which 29 February is present.
Leap year also identify by using some mathematical algorithms, If any year is divisible by 4 and gives remainder 0 than that year is leap year. ex 400, 800, 1200, 1600, 2000, 2004, 2008 etc.
Program:
Output:
Please comment and give Suggestion on this post, if you want any other program or help then type in comment or contact me, and give feedback for this blogs.
Leap year also identify by using some mathematical algorithms, If any year is divisible by 4 and gives remainder 0 than that year is leap year. ex 400, 800, 1200, 1600, 2000, 2004, 2008 etc.
Program:
#include<stdio.h>
|
int main()
|
{
|
int i;
|
char a;
|
do
|
{
|
printf("\nEnter year=");
|
scanf("%d",&i);
|
if(i%4==0)
|
{
|
printf("\n%d is leap year",i);
|
}
|
else{
|
printf("\n%d is not leap year",i);
|
}
|
printf("\nDo u want to Continue(y/n)=");
|
scanf("\n%c",&a);
|
}while(a=='y'||a=='Y');
|
printf("\nThank you...\n");
|
return 0;
|
}
|
Output:
No comments:
Post a Comment