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
How can I manipulate individual bits?
What does a pointer variable always consist of?
which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +
What is default value of global variable in c?
What is the acronym for ansi?
Can you write the function prototype, definition and mention the other requirements.
What are the two types of structure?
What is a const pointer?
What is a pointer value and address in c?
What is this infamous null pointer, anyway?
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
What is unary operator?
Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.
Explain modulus operator. What are the restrictions of a modulus operator?
Can the curly brackets { } be used to enclose a single line of code?