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
What is variable initialization and why is it important?
How can I implement sets or arrays of bits?
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
In C programming, how do you insert quote characters (‘ and “) into the output screen?
What is dynamic dispatch in c++?
What are pointers? What are different types of pointers?
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
How do you determine the length of a string value that was stored in a variable?
what is ur strangth & weekness
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
write a program to find out prime number using sieve case?
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......
How do you convert strings to numbers in C?
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.