Write a c pgm for leap year

Answer Posted / narayan sharma

#include<stdio.h>
#include<conio.h>
void main()
{
int y;
clrscr();
printf("\n\n\t Enter The Year\n\n\t");
scanf("%d",&y);
if (y%100==0)
{
if (y%400==0)
printf("\n\n\t Leep Year\n\n");
else
printf("\n\n\tNot Leep\n\n\t");
}
else
{
if (y%4==0)
printf("\n\n\t Leep Year\n\n\t");
else
printf("\n\n\t Not Leep");
}
getch();
}

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I manipulate individual bits?

609


What does a pointer variable always consist of?

666


which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +

1187


What is default value of global variable in c?

564


What is the acronym for ansi?

632






Can you write the function prototype, definition and mention the other requirements.

664


What are the two types of structure?

579


What is a const pointer?

639


What is a pointer value and address in c?

636


What is this infamous null pointer, anyway?

612


please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics

2861


What is unary operator?

661


Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.

3127


Explain modulus operator. What are the restrictions of a modulus operator?

601


Can the curly brackets { } be used to enclose a single line of code?

716