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 is the difference between array and pointer in c?

1085


Difference between linking and loading?

1058


Explain the difference between null pointer and void pointer.

1030


What is the purpose of sprintf() function?

1052


What is default value of global variable in c?

936


What does static variable mean in c?

1059


What are the disadvantages of external storage class?

1003


Write a program to identify if a given binary tree is balanced or not.

1089


Explain what math functions are available for integers? For floating point?

1060


Explain what is the difference between the expression '++a' and 'a++'?

1149


What is a pragma?

1074


Write a program to swap two numbers without using third variable in c?

1069


How variables are declared in c?

987


write a program to display all prime numbers

1909


Describe the header file and its usage in c programming?

1010