Write a c pgm for leap year

Answer Posted / azad sable,chiplun.

void main()
{
int yr;
clrscr();
printf("enter the year");
scanf("%d",&yr);
if(yr%100==0)
{
if(yr%400==0)
printf("\nLeap year");
else
printf(\nNot aleap year");
}
else
{
if(yr%4==0)
printf(\nLeap yaer");
else
printf("\nNot a leap year");
}
getch();
}

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is event driven software and what is procedural driven software?

2023


What is clrscr ()?

649


What is pass by value in c?

611


Why isn't any of this standardized in c? Any real program has to do some of these things.

635


What are header files in c?

629






What is ## preprocessor operator in c?

624


What is a structure and why it is used?

630


What do you mean by Recursion Function?

636


Explain what are multibyte characters?

635


What are different storage class specifiers in c?

632


Explain what is the stack?

653


a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none

732


What are the standard predefined macros?

647


What is s or c?

608


Explain how do you determine a file’s attributes?

603