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
what is event driven software and what is procedural driven software?
What is clrscr ()?
What is pass by value in c?
Why isn't any of this standardized in c? Any real program has to do some of these things.
What are header files in c?
What is ## preprocessor operator in c?
What is a structure and why it is used?
What do you mean by Recursion Function?
Explain what are multibyte characters?
What are different storage class specifiers in c?
Explain what is the stack?
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
What are the standard predefined macros?
What is s or c?
Explain how do you determine a file’s attributes?