Write a c pgm for leap year
Answer Posted / narayan sharma
#include<stdio.h>
#include<conio.h>
void main()
{
int y;
clrscr();
printf("\n\n\t Enter The Year\n\n\t");
scanf("%d",&y);
if (y%100==0)
{
if (y%400==0)
printf("\n\n\t Leep Year\n\n");
else
printf("\n\n\tNot Leep\n\n\t");
}
else
{
if (y%4==0)
printf("\n\n\t Leep Year\n\n\t");
else
printf("\n\n\t Not Leep");
}
getch();
}
| Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
When is the “void” keyword used in a function?
Write a code on reverse string and its complexity.
What are the advantages and disadvantages of c language?
Differentiate between calloc and malloc.
What is a static function in c?
What is scope of variable in c?
Explain what is wrong with this program statement? Void = 10;
what is a constant pointer in C
What is pragma in c?
Do you know what are the properties of union in c?
What is wild pointer in c with example?
what is a function method?give example?
What was noalias and what ever happened to it?
What is array of structure in c?