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 the total generic pointer type?
What is putchar() function?
What is pointer to pointer in c with example?
What is the difference between arrays and pointers?
Are negative numbers true in c?
How do you search data in a data file using random access method?
what is the difference between 123 and 0123 in c?
What is the difference between NULL and NUL?
How do I read the arrow keys? What about function keys?
Is main an identifier in c?
What is double pointer?
What is a scope resolution operator in c?
What is array of pointers to string?
What are the types of functions in c?
What is the use of header?