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
Explain what are its uses in c programming?
What is character constants?
#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }
what is ur strangth & weekness
What is the method to save data in stack data structure type?
What is the size of enum in bytes?
how to capitalise first letter of each word in a given string?
What is the use of a semicolon (;) at the end of every program statement?
What is a function simple definition?
Can you please explain the difference between malloc() and calloc() function?
Write a program in c to replace any vowel in a string with z?
How can I do peek and poke in c?
Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor
How can I find out how much free space is available on disk?
Explain why can’t constant values be used to define an array’s initial size?