Write a c pgm for leap year

Answer Posted / rukmanee

#include<stdio.h>
#include<conio.h>
void main()
{
int year;
clrscr();
printf("\n enter a year:");
scanf("%d",&year);
if(year%2==0&&year%100==0&&year%400==0)
{
printf("the given year is a leap year");
}
else
{
printf("the given year is not a leap year :");
}
getch();
}

Is This Answer Correct ?    4 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is null character in c?

684


What is meant by inheritance?

622


By using C language input a date into it and if it is right?

565


Is c language still used?

532


Is flag a keyword in c?

673






Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)

600


What is return in c programming?

507


Is it possible to have a function as a parameter in another function?

594


What are identifiers in c?

626


Write a Program to accept different goods with the number, price and date of purchase and display them

5432


Explain the difference between strcpy() and memcpy() function?

584


What are pointers?

624


Is null equal to 0 in sql?

643


What is sizeof c?

600


write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.

14948