Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 are # preprocessor operator in c?

1109


What is the use of #include in c?

1085


What is a far pointer in c?

1045


What is the difference between arrays and pointers?

1128


What is the difference between typedef and #define?

1062


What is the use of clrscr?

1104


Which is the memory area not included in C program? give the reason

1947


Write a factorial program using C.

1078


What is scope and lifetime of a variable in c?

1063


What do the functions atoi(), itoa() and gcvt() do?

1183


In C programming, what command or code can be used to determine if a number of odd or even?

1054


What type is sizeof?

1039


GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)

1097


Is c procedural or functional?

1025


Can I initialize unions?

1038