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 are the 5 types of organizational structures?
Why c is known as a mother language?
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
What is register variable in c language?
write a c program to find the sum of five entered numbers using an array named number
How many levels of indirection in pointers can you have in a single declaration?
What are the scope of static variables?
Why void is used in c?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
Can we use visual studio for c?
Where in memory are my variables stored?
What is exit() function?
What does printf does?
Difference between Shallow copy and Deep copy?
How is a macro different from a function?