Answer to Question #25123 in C++ for soumyajyoti dutta
Write a C++ program to find out whether a year (entered in 4-digit number representing it) is a leap year.
1
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!
Learn more about our help with Assignments:
C++
Comments
Leave a comment