adspace


Write a c pgm for leap year

Answer Posted / aniket

#include <stdio.h>
#include <conio.h>

void main()
{
int year;
clrscr();

printf("\n\t : TO CHECK LEAP YEAR :");
printf("\n Enter your year : ");
scanf("%d", &year);

if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
{
printf("\n\a L E A P Y E A R");
}
else
{
printf("\n\a N O T L E A P Y E A R");
}
getch();
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is variable initialization and why is it important?

1404


How can I implement sets or arrays of bits?

1129


hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel

1947


In C programming, how do you insert quote characters (‘ and “) into the output screen?

1625


What is dynamic dispatch in c++?

1142


What are pointers? What are different types of pointers?

1276


PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM

2269


Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?

1188


How do you determine the length of a string value that was stored in a variable?

1209


what is ur strangth & weekness

2598


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

1307


write a program to find out prime number using sieve case?

2182


can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......

2019


How do you convert strings to numbers in C?

1351


Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.

2406