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 c value paradox explain?
How can I avoid the abort, retry, fail messages?
How can I sort more data than will fit in memory?
What is pivot in c?
What is the use of a semicolon (;) at the end of every program statement?
When is a null pointer used?
How a string is stored in c?
What are linker error?
What are different storage class specifiers in c?
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
What is the difference between formatted&unformatted i/o functions?
Explain the use of function toupper() with and example code?
Which is better oop or procedural?
what will be the output for the following main() { printf("hi" "hello"); }
define string ?