60 337
Assignments Done
98%
Successfully Done
In April 2018

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

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions