Question #25123

Write a C++ program to find out whether a year (entered in 4-digit number representing it) is a leap year.

Expert's answer

#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!

LATEST TUTORIALS
APPROVED BY CLIENTS