Write a c pgm for leap year

Answer Posted / anika

#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
int y;
cout<<"enter any number ";
cin>>y;
if(y%4==0;)
cout<<"the number entered is a leap year ";
else
cout<<"it is not a leap year ";
getch();
}

Is This Answer Correct ?    10 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

1510


Why do some versions of toupper act strangely if given an upper-case letter?

636


How to write a multi-statement macro?

629


Here is a neat trick for checking whether two strings are equal

568


What are the advantages of using Unions?

646






How can I call a function with an argument list built up at run time?

646


What are pointers in C? Give an example where to illustrate their significance.

754


What is function prototype in c with example?

583


Where are local variables stored in c?

576


largest Of three Number using without if condition?

1012


Why is sprintf unsafe?

623


Can we declare variable anywhere in c?

541


what is a constant pointer in C

684


Explain zero based addressing.

613


What are run-time errors?

604