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 %d called in c?
Can a file other than a .h file be included with #include?
What do the functions atoi(), itoa() and gcvt() do?
What is main () in c?
write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);
How many loops are there in c?
How will you find a duplicate number in a array without negating the nos ?
Describe the header file and its usage in c programming?
Why main is not a keyword in c?
How is = symbol different from == symbol in c programming?
What is %s and %d in c?
What does a pointer variable always consist of?
Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.
What is structure and union in c?
Write a program for finding factorial of a number.