Answer to Question #25123 in C++ for soumyajyoti dutta

Question #25123
Write a C++ program to find out whether a year (entered in 4-digit number representing it) is a leap year.
1
Expert's answer
2013-02-26T11:18:03-0500
#include<stdio.h>
#include<conio.h>
void main()
{
int n;
clrscr();
printf("
Enter the year:");
scanf("%d",&n);
if((n%400==0)||((n%4==0)&&(n0!=0)))
printf("Leap Year");
else
printf("Not a Leap Year");
getch();
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS